Classic ASP and Amazon MWS

Okay, I know I am writing about stuff almost no one cares about. Classic ASP is the Dodo of web programming. Who in their right mind would be writing Classic ASP transactions to Amazon MWS? Isn’t Classic ASP dead! The only saving grace from Amazon not supporting Classic ASP is that Amazon’s support of PHP or C# is  not exactly brilliant. So for the few of you who might be interested, submitting MWS transactions using Classic ASP can be done. Most of the ASP code is already available in the forums. The only trick is the  request and feed signatures.

The key to the request signature problem was to implement Daniel O’Malley’s contribution in the post, I have authentication code for Classic ASP — anyone need it?. The trick was how to create a base64 encoded SHA256 signature that Amazon requires for the request. Several people tried to write native ASP functions for SHA256, MD5, and Base64 encoding but they could not match the results of the Amazon Scratchpad.  Daniel’s solution was to call JavaScript functions from ASP. That was brilliantly simple! He wrote a simple WSC wrapper for the JavaScript code available at http://pajhome.org.uk/crypt/md5/ and published it as sha256.wsc. That was cool! The Base64 encoded SHA256 signatures it generates matches the Amazon Scratchpad. I got it to work on the ListOrders and GetOrder transactions but I needed more. I needed to submit a “_POST_ORDER_FULFILLMENT_DATA_” feed and Amazon required a Base64 encoded MD5 signature for the feed data. This is an important transaction if you want to get paid. If you do not have a lot of Amazon orders your marketing person could update this manually. If you prefer the marketing person to focus on generating more sales, you should probably consider doing this task automatically. In our case we had a system that kept track of tracking numbers for each order.  So I followed Daniel’s example and merged the MD5 code from the same web site into Daniel’s code. My code is called sha256md5.wsc file. My testing confirmed that it generated both sha256 and md5 signatures that matched the Amazon Scratchpad. After a week of posting fulfillment data I have to conclude it is working. Your mileage may vary! Guess what? Our sales are up! I guess the plan of letting marketing folks focus on marketing is working! I love it when a plan comes together!

Since several people asked for it. Here is the wsc file, sha256md5.txt. I hope it helps.

SQL 2008 Express installation errors with 0x84B10001

In my case I was trying to update SQL Server Management Studio (SSMS) from 2005 to 2008. Yea, I know it is 2012 but the 2005 stuff was working. As a general rule I don’t mess with stuff that is working but 2008 SSMS is a simple way to get 2008 SMO for PowerShell. The 2008 SSMS installation complained about the existing 2005 version and asked me to uninstall the 2005 version before proceeding. After I uninstalled the 2005 version I resumed the 2008 installation and it generated this error message.

SQL Server Setup has encountered the following error:

Unable to generate a temporary class (result=1).
error CS0006: Metadata file ‘C:\WINDOWS\assembly\GAC_MSIL\MSClusterLib\1.0.0.0__89845dcd8080cc91\MSClusterLib.dll’ could not be found

Error code 0x84B10001.

Although some folks recommended repairing the SQL installation, my fix was simple. I restarted the 2008 installation and it re-installed the missing items.

Getting Updated Google Shopping Results

After I fixed my problem with Google Shopping I decided to see how long it would take for my browser to show correct shopping results. It has been almost a week and no change in the results. Today I decided to move on. I fixed the problem on Internet Explorer by deleting browsing history(cookies). Fixing the problem on Google Chrome was a bit more challenging. Here was the setting that worked.

Settings - Clear browsing data_2012-11-05_11-56-33