OrderDiscount Writes discount_timestamp Properties Into The Future?

back-to-the-future-film-poster The Commerce Server OrderDiscount pipeline component writes applicable discount information into the Order dictionary.  Specifically, it writes discount information into the item._itemlevel_discounts_applied  SimpleList and the _orderlevel_discounts_detail Dictionary/SimpleList.  The written information includes the property discount_timestamp which contains the last modified DateTime for the discount.  Curiously, it would appear that the values placed in these discount_timestamp properties are always one second later than the actual last modified DateTime value.  The correct value can be found in the dt_campaignitem_modified column of the mktg_campaign_item table (where the discounts and other campaign items are stored).

Is this a hack of some sort?  A mistake on my part?  A bug?  I have not done a detailed investigation (as that would be sad) so I don't really know the answer.

Filed under Commerce Server minutiae.  Do not read when operating heavy machinery as may cause drowsiness.

  Posted: 02:50:21 Tue 10 Mar 2009  Tags: Commerce Server 2007 | Commerce Server 2009
   Permalink Comments [0]

Fix: Microsoft File Transfer Manager Keeps Downloading Old Cancelled Entries

Microsoft File Transfer Manager screen shotThe Problem:  A few months back I had some issues downloading files from Microsoft Connect and MSDN Subscriber Downloads.  Ever since then, the Microsoft File Transfer Manager (FTM) has been acting crazy.  It retains entries to previous successful and cancelled downloads and attempts to re-download them (unsuccessfully) every time I try and download something new.  Cancelling these entries repeatedly does not make any difference.  They keep reappearing.  THIS IS QUITE ANNOYING! 

The Fix:  Today I fixed the issue.  After firing up Procmon I quickly determined that File Transfer Manager was reading files from the following folder:

C:\Users\MickeyMouse\AppData\Roaming\Microsoft\File Transfer Manager\RequestQueue

The RequestQueue folder contained a bunch of files with the extension .dlm.  After deleting all of these dlm files Microsoft FTM started working again as normal.  I did not bother looking in these files, I just figured they contained the fubar requests and thus deserved to be destroyed without impunity.

PS My username is not MickeyMouse.

  Posted: 12:16:11 Thu 19 Feb 2009  Tags: Microsoft File Transfer Manager | Micro-Tedium | Tips
   Permalink Comments [2]

Commerce Server 2009 Overview Document (from NRF)

The Commerce Server team demonstrated Microsoft Commerce Server 2009, at the recent National Retail Federation 2009 Expo.  I did not attend, but I just noticed a Commerce Server 2009 overview document from the event.  Useful, if you want a quick introduction.

Commerce Server 2009 Solution Overview Diagram 
Commerce Server 2009 Solution Overview Diagram
This image is also from the document (although not itself, hugely enlightening).

  Posted: 05:13:34 Sun 25 Jan 2009  Tags: Commerce Server 2009
   Permalink Comments [0]

Commerce Server 2009 Release Candidate Shipped

So, I blog about the Commerce Server 2009 CTP and two days later Microsoft go and ship the Commerce Server 2009 Release Candidate!  Congratulations to the Microsoft and Cactus teams for shipping regularly.  Looking forward to playing with the bits.  Download Commerce Server 2009 Release Candidate.

  Posted: 09:26:33 Thu 15 Jan 2009  Tags: Commerce Server 2009 | Commerce Server Mojave
   Permalink Comments [0]

Commerce Server 2009 CTP

Ben Taylor surfing and not thinking about Commerce Server 2009 Er, about a month ago, Microsoft released a CTP of Commerce Server 2009 (the product formerly known as Commerce Server Mojave).  This is the first feature complete release of the product, unlike the previous Mojave CTPs.  Changes include the completed "out-of-the-box" SharePoint site and a package that "seamlessly" upgrades existing CS 2007 deployments.  Download Commerce Server 2009 CTP.

Old news I know, but I was surfing Playa Guiones (Costa Rica) at the time (hence the gratuitous holiday photo placement).

If you are using the Commerce Server 2009 CTP, don't forget you can submit feedback on the Microsoft Commerce Server Connect Site.

  Posted: 10:42:25 Mon 12 Jan 2009  Tags: Commerce Server 2009 | Commerce Server Mojave
   Permalink Comments [0]

Commerce Server Mojave November CTP Released

Picture of the Commerce Server Mojave November CTP files on my hard drive ;)Tom Schultz has just announced that the Commerce Server Mojave November CTP is now available to download.  I think this is the last planned CTP before the product ships.  The download includes the following 3 files:

  • Commerce Server Code Name Mojave November 2008 CTP Readme.htm
  • MojaveInstall.chm - An install guide for Mojave and the Default Site
  • CS2K7MOJAVE1.iso - An ISO of the Mojave setup disk.

Download Commerce Server Mojave November CTP from Microsoft Connect
File Transfer Manager (FTM) not working for me (getting error 12037) but individual file downloads areRequires a Live Id.

Thanks to Tom and the team for getting this up.

  Posted: 06:43:00 Sat 22 Nov 2008  Tags: Commerce Server Mojave | Ecommerce
   Permalink Comments [0]

Scott Cairney Interview on Commerce Server Mojave

Scott Cairney being interviewed about Microsoft Commerce Server Mojave at Tech-Ed Barcelona.About Scott Cairney - Scott Cairney is a Commerce Server Veteran and key player in the creation of Commerce Server Mojave.  He has been deeply involved with Commerce Server since Commerce Server 2000.  Scott is currently a Product Manager in the Commerce Server Product Group and Vice-President Product Management at Cactus

Scott on Mojave at Tech-Ed - Scott recently took a European holiday ;) presented a couple of sessions at Tech-Ed Barcelona.  I have been unable to find these sessions online (unlike the Mojave PDC session).  However, Mark Dunn of .NET Rocks interviewed Scott about Mojave while at Tech-Ed and this is online.  You can Watch Scott Cairney and Mark Dunn discuss Commerce Server MojaveNote: The interview is available in other formats.  For the links, go to the Tech-Ed Tech-Talks page and search for "Commerce Server" (there is no direct link to the interview page!).

Scott on Commerce Server Mojave Feedback - Given the wholesale API change in Mojave, I am very interested to hear what people think about it.  Apparently Tech-Ed participants had plenty of feedback, as Scott says in the interview:

"We did get a lot of feedback... We got some terrific feedback.  We got some negative feedback.  We got feedback saying it is too generic, some people are saying it is not generic enough.  So we think it's great, the fact that there is now a discussion of Commerce Server."

I agree.  It is exciting to be getting a major new rev of Commerce Server and it will be fun to discover and talk about.  I mean, not as exciting as white water rafting, or sticking your tongue in an electric socket, but you know what I mean. 

Have you looked at Mojave yet?  What are your thoughts?

PS Tom Schultz just announced the Commerce Server Mojave November CTP drop.  Download does not seem to work for me :(

  Posted: 02:04:56 Thu 20 Nov 2008  Tags: Commerce Server Mojave | Ecommerce | Microsoft
   Permalink Comments [0]

Scott Guthrie on Smack and Meth (or was it MEF?) - Exclusive Microsoft PDC Video

In this video, Scott Guthrie (aka ScottGu), explains how his team originally used Smack (their nickname for Simple Managed C or  SMC) to write ASP.NET.  However, they later decided to write it in C# on the CLR (we all know using smack is bad).  Scott explains why the decision was "important", "super risky" and the "single biggest" they made in regards to server-side .NET.  If they had not done this, the server-side .NET world we know today may have been different.  It is (in my view) a really interesting bit of history (the original .NET class libraries were also written in SMC and then ported to Cool, later named C#).

This was filmed at the Microsoft PDC 2008 in LA (by me), during Scott's session at the Open Space area.  Thanks to Scott Guthrie for taking the time to talk to us and all people that contributed to the interesting Open Space sessions.

Need something else to do?  Go use some MEF.  "I am a tool window" what are you?

  Posted: 05:15:10 Fri 31 Oct 2008  Tags: ASP.NET | MEF | Microsoft | PDC | Scott Guthrie
   Permalink Comments [0]

Commerce Server Mojave PDC Session Video Available Now

Tom Schultz and Kerry Havas presented the session Commerce Server Mojave : Overview on Monday at the Tom Schultz and Kerry Havas presenting Commerce Server Mojave talk at the LA PDC 2008.Microsoft PDC in LA.  The video of this session is available now - Watch Commerce Server Mojave : Overview.  Kerry covered the new API and Tom stitched together a site in about 5 minutes with the new Mojave SharePoint web parts.  Unfortunately, the session started late (the film crew failed to show on time) so they did not get the chance to cover the new Mojave Operational Sequences architecture.

I had the opportunity to talk to Tom and Kerry after the session too.  I had some robust feedback on the new API and they were kind enough to listen to my ravings.  We had a pretty good conversation, with good points made on all sides.  One of the things I took away from this (and from the PDC in general) is the difficulty of addressing the needs and wants of all different types of development groups and individuals (see also Entity Framework!).

I will be posting more on my thoughts about the new API soon.  What do you think about it?

  Posted: 05:02:54 Wed 29 Oct 2008  Tags: Commerce Server 2007 | Commerce Server Mojave | Ecommerce | PDC
   Permalink Comments [0]

Commerce Server Mojave October CTP Available on Connect

commerce server 2007 image of a man smiling at a computer Kamoji has just posted that the October CTP of Commerce Server "Mojave", the next significant revision of Commerce Server is now available to download (via Microsoft Connect) by the general development public.  Previously, you could only get the Mojave bits if you were participating in the Commerce Server Mojave Technology Adoption Program (TAP)However, at the time of writing, the October CTP download link appears to be broken (for me)Update 23/10:  The October CTP download link is working fine.  It takes you to an EULA with a follow up download email.  The announcement was made on the public Microsoft Commerce Server Product Unit e-commerce Blog, so I am assuming it is genuine and public.

Final Mojave CTP in November so get your feedback in now!  The CTP post also outlines the remaining CTP timeline.  There will be one more CTP in the "November 2008 time frame".  Therefore, it is important to get feedback to the product team now.  The phases outlined here would suggest that after the final CTP the product will go straight to Release Candidate (i.e. missing out Beta).  Therefore, I would assume that the November CTP will be pretty baked.  Not much time.  Get on it! (and if you can be bothered feel free to post your thoughts in the comments below).

Mojave October CTP bits just-in-time for the PDC?  The MS e-commerce blog also posted (3 hours later) that the Commerce Server Product Team will be attending the Microsoft PDC in LA next week.  Not only that, but they will be doing a session on Mojave.  This session is a late edition to the PDC (and is still not in the sessions list).  The session abstract is as follows:

In this session you will get an in depth look into the new Commerce Server “Mojave” product release.  Learn how you can use Commerce Server’s next-gen e-commerce API to develop performant, multi-channel e-commerce websites.  See improvements to the programming model, improved functionality for working with the desktop and devices, and integration of Commerce Server with SharePoint for search scenarios, content management, and social networking.  We’ll also show how to use the “Mojave” e-commerce web parts to quickly build rich, custom user experiences.

Do you work with Commerce Server?  Are you going to the LA PDC next week?  Do you like to drink one or two beers and talk about software development?  If you answered yes to any of these, drop me a line and we can meet up!

  Posted: 04:08:17 Tue 21 Oct 2008  Tags: Commerce Server 2007 | Commerce Server Mojave | Ecommerce
   Permalink Comments [0]

Easy Commerce Server Pipeline Component Debugging with IIS7s appcmd.exe

If you have worked on a large Commerce Server implementation, you have likely built a custom pipeline component or two.  This makes you part of a very special band of brothers (requires Facebook login).  It also means that you have probably seen your fair share of the build error "Unable to copy file ... The process cannot access the file XYZ" (pictured below in all it's namespace censored glory)...

Picture of build error, unable to copy file ... the process cannot access the file XYZ.

This error usually occurs when you build pipeline component project, having just run a pipeline that contains the same physical component (or another component in the same assembly).  The reason it occurs is that the process hosting your website (in my case w3wp.exe) has an open file handle to the assembly containing your pipeline component.  Hence you can't copy over it :(

In the past I have resolved this using one of the following methods:

However, all of these involve what I call micro-tedium.  Micro-tedious tasks are those computing tasks that are so small that they appear insignificant, but in reality suck the life out of you (like the Large Hadron Collider is also probably doing right now).

Anyway, I digress.

My Slightly Funky but Practical Solution to "The Process Cannot Access the File" Tedium

IIS7 ships with a new tool called Appcmd.exe.  It is a command line tool that lets you do useful stuff like create and configure sites, view information about worker processes and start and stop application pools!

So, for pain free pipeline component development, use appcmd.exe in the pre and post-build events of your pipeline component project, to stop and start the application pool that hosts your Commerce Server site.  My build event commands look like this (you will need to replace DefaultAppPool with the name of the Application Pool your Commerce Server site is running in):

Picture of pre-build command line: %systemroot%\system32\inetsrv\appcmd.exe stop apppool DefaultAppPool

Picture of post build command line: %systemroot%\system32\inetsrv\appcmd.exe stop apppool DefaultAppPool

Configuring your build event commands like this results in the following occurring in order when you build your pipeline component project:

  • Before the build, the application pool is stopped.
  • Your project builds.
  • After the build the application pool is started again.

It works for me.  Does it work for you?  Any elegant(er) solutions out there?

Important Note about Exit 0The exit 0 command is included so that the return code is always success, even if appcmd has a non-success return code.  I do this because Appcmd will fail to stop the application pool, if the application pool is not already running.  This would then cause your build to fail.  The exit 0 command stops that happening.  If you have other commands in your build event, exit 0 could mask their failure.

Stuck on IIS 6?  If you are stuck on IIS 6 you may want to hack up something similar using one of the IIS 6 Command Line Tools (I think it is possible!).

Appendix:  Paste-able Version of the Appcmd Commands Used
%systemroot%\system32\inetsrv\appcmd.exe stop apppool DefaultAppPool
exit 0

%systemroot%\system32\inetsrv\appcmd.exe start apppool DefaultAppPool
exit 0

  Posted: 07:16:11 Mon 15 Sep 2008  Tags: Commerce Server 2007 | Commerce Server Mojave | Micro-Tedium | IIS 7 | Pipeline Components | Visual Studio
   Permalink Comments [0]

Get xUnit.net Working with Resharper 4.1

Update 17/09/2008:  You no longer need the patch in this post.  Brad Wilson and the team at xUnit.net have just released xUnit.net Version 1.0.3.  This release supports ReSharper 4.x via a new, smarter installer.

Hi, my name is Ben and I am a ReSharper fanboyIf you ever have the misfortune of pair programming with me, I promise not to shout Ctrl+Alt+V , Ctrl+Q etc over your shoulder (sorry Mike).

Anyway, being a fanboy, I rushed out and installed ReSharper 4.1 as soon as it came out.  Unfortunately, this resulted in the loss of the the xUnit.net ReSharper integration that I also use!  Why you ask?  Well ReSharper plugins have to live in a sub-directory of the ReSharper install folder and every time ReSharper rev, they move the install location and the registry settings.  This means that when you run VS.NET you lose the test runner functionality and when you try and re-install xUnit R# integration you see red....  Bad R#. Boo.

sshot-2

So, I popped off to the xUnit.net discussions on CodePlex to find out about plans for R# 4.1 support and I ended up writing a patch to make it work (big thanks to Brad Wilson for his R# related patience and quick responses).  My installer now looks like this:

 sshot-3

I could not submit patches to xUnit for some xUnit legal reasons (IP Stuff).  So, if you want to get it running you can download the install binaries I built, or do the patch work yourself.

Do any of this at your own risk.  It is not my fault if this causes your machine to melt, or you to lose hectares of code etc, ad-infinitum.

Use the Binaries I Patched and Built

  1. Download my xUnit Installer Binaries for ReSharper 4.1
  2. Extract the zip and run xunit.installer.exe.
    Note:  There are not "official" xUnit binaries.  I modified and built these.

Or...

Patch xUnit Installer for ReSharper 4.1 Support

  1. Install ReSharper 4.1.
  2. Get the latest xUnit source (I used rev 23764).
  3. Apply my xUnit.net ReSharper 4.1 installer patch to xUnitSourceRoot (i.e. the root of where you checked out).
  4. Run xUnitSourceRoot\Main\3rdParty\Get3rdParty.cmd
  5. Make sure that xUnitSourceRoot\Main\3rdParty just filled up with a bunch of ReSharper binaries.
  6. Open xUnitSourceRoot\Main\xunit.sln
  7. Rebuild All.
  8. Run the installer:
    xUnitSourceRoot\Main\xunit.installer\bin\Debug\xunit.installer.exe
  Posted: 05:40:28 Thu 4 Sep 2008  Tags: ReSharper | xUnit | Open Source | Unit Testing
   Permalink Comments [3]

Software Development Tools List

Whenever I am building a new PC I always forget to install some of the tools that I love.  When I remember that I forgot, I then sometimes struggle to remember what that little tool that does some tiny little thing that I love, but has a weird name is called.

No more.  They will now be collated here and perhaps one day, when I grow up, I will have a tools list as big as Hanselman's Tools List.

My .NET Life Would Not be Worth Living Without

  • ReSharper - Does it make you 10 times better or 100?  The argument rages.
  • Reflector - Lutz Roeder's baby, now with redgate.
  • GhostDoc - Spooky how it makes your code look better.
  • Visual Studio - What good is a sexy add-in, without a something to add it to?
  • Subversion - Source control I trust.  Made me forget VSS and (so far) ignore TFS.
  • TortoiseSVN - Explorer GUI for Subversion.  Will my head be turned by Visual SVN?
  • Google - Yeah I know.  But when did you last hit F1 in Visual Studio and NOT smash your monitor?
  • Firefox Add-ons - I wonder if there is a tool to do XYC?  Yep, someone built it.  See my faves below.

The Rest...

  • 7-Zip - Especially now WinZip want to charge me for something every 10 minutes.
  • TrueCrypt - The last line between my key chain flash drive and MI5... (this is a joke, packet sniffers)
  • RoboForm2Go - The only thing that knows all my passwords.
  • Send To Toys - Lets me do things like "Send to Command Prompt".  Although not on Vista right now (for me).
  • PlainTextClipboard - Takes all the fancy formatting that other apps put on the clipboard and plaintextifies it.
  • JkDefrag - Simple and mesmerising defrag.  Look into my clusters...
  • Workrave - Sheep that keeps my ulna nerve healthy.  Reminds me that 12 hours non-stop coding is bad.
  • Ultramon - A must have for the multi-monitor warrior (I am only a 2 panel man).
  • Fiddler2 - Who doesn't like to sniff HTTP?  It's all the rage and Fiddler is still my fave.

...and Firefox

Firefox - Mainly because of the following extensions:

Updated:  26/08/2008 with Firefox section and some other minor edits.

  Posted: 09:40:07 Sun 24 Aug 2008  Tags: BenTaylor | Productivity | Programming | Tools
   Permalink Comments [0]