Commerce Server Orders Adapter on 64-bit BizTalk in a 64-bit Host

Recently I have spent a lot of time working with the Commerce Server 2007 Orders Adapters for BizTalk. 

Getting it set-up and running on a single machine with BizTalk and Commerce Server together was not too hard (although anyone who thought BizTalk 2004 was hard to install should try installing Commerce Server).  Getting everything to work correctly on a 64-bit BizTalk Server installation was another story.

I was running BizTalk 2006 R2 64-bit with a 64-bit process Host.  I was setting up the Commerce Server Order Receive Adapter just like I had many times, only to receive the following two errors:

90% of the time:

Access to the registry key ‘HKEY_LOCAL_MACHINE\Software\Microsoft\Commerce Server 2007 BizTalk Adapters\Orders\<some key>’ is denied.

10% of the time:

The Messaging Engine failed to update the configuration for the receive location “Receive Location1” with URL “<some address>” for adapter “Commerce Server Orders”. Reason: “Object reference not set to an instance of an object.”.

For those of you who have not worked with the Orders Adapter before, when you create a new Receive Location the adapter creates a local registry key to use to store the last polling time.  When I set up this receive location, I checked the registry by doing a search for “<some key>”.  I found the key inside the registry and noticed it was automatically created for me by the BizTalk Adapter as it should have been.

So what was the registry permission problem?

This page in the Commerce Server 2007 help guide was helpful in finding the bug… I mean problem.  This states that on a 64-bit BizTalk Server, the Commerce Server Adapter uses two different registry locations depending on if your host is 32-bit or 64-bit.

For a 32-bit Host, the keys should be here:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Commerce Server 2007 BizTalk Adapters

For a 64-bit Host, the keys should be here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Commerce Server 2007 BizTalk Adapters

Since my host is a 64-bit Host, the error message above is correct in the location it is looking for the registry settings. 

So what happened to the settings I saw in the registry?  It turns out they were put into the Wow6432Node and I did not notice the full path to the registry key.

The fix was simple.  All I had to do is move the keys the Adapter created in the incorrect location into the expected location for the 64-bit Host.  Note that this process will need to be done any time the Registry Key changes, which on a production server should be almost never or any time you add a new receive location.

To summarize:
When running a 64-bit Host with the Commerce Server Orders BizTalk Adapter, you need to move the auto created registry keys from the Wow6432Node location to the correct location.

Note that 32-bit Hosts running on 64-bit BizTalk Servers do not have any issues, nor do 32-bit BizTalk Servers.

Commerce Server Orders Receive Adapter: Search clause factory failed

Sometimes getting BizTalk to communicate successfully with Commerce Server 2007 using the provided Orders Adapter can be tricky.

Here is a quick tip when initially setting up the Orders Receive Adapter in BizTalk 2006 R2.

If you receive the following error:

Creating the search clause factory failed for Commerce Server Orders Receive Adapter.  Message You are not authorized to perform the requested operation. 

Make sure the user the BizTalk Host is running under is added to the Commerce Server Order Web Service using azman (I made the user an Orders Admin) and that anonymous access is disabled on the site hosting the web services.

If you are on the same domain and Windows Authentication is enabled, make sure you are not supplying a user name and password on the receive location.

Hope this helps!

Catalog Imports into Commerce Server with the BizTalk Adapter

Recently I’ve been doing some work Commerce Server 2007 and BizTalk Server 2006 R2.  I have been using the Microsoft supplied Commerce Server Adapters for integration between Commerce Server and various systems. 

For those of you who do not have a lot of experience with Commerce Server, both the BizTalk Adapters and the Commerce Server Catalog Manage use the supplied Commerce Server Web Services for Catalog Imports.

When working with large catalog imports, both tools will run into a minor limitation with the file size. 

You may start to see this error when working with large catalog imports:

“The import failed because the import file is larger than the maximum size allowed on your server. Contact your system administrator.”

This is because the default maximum file size is around 200 MB. 

Good news!  This value is very easy to update.  Simply navigate to the web.config file of the Catalog Web Service. 

Look for the following attribute of of the catalogWebService node:

<catalogWebService maxUploadFileSize=”204800″ /></catalogWebService>

All you need to do is change the value, reset IIS, and you are all set to upload larger files.

I’ve ran files in excess of 1 GB though both the Catalog Manager and the BizTalk Catalog Commerce Server Adapter.  I’m very surprised with the overall performance and shocked the whole thing does crash with such large files!

Updated BizTalk Community Blog OPML File

I’ve made some updates to the BizTalk Community OPML File.  I currently have 88 Active BizTalk Bloggers on the list. 


Most of these can be found on our community blog aggregation site.


For anyone wishing to use their own blog reader, the updated OPML can be found here. 


I also have a separate list of not-so-active BizTalk Blogger.  These people may have moved blogs or changed career – but the existing content is still relevant.  That OPML file can be found on the same download page.


As always, if you know any BizTalk blogs not on the list, please let me know.


As a special bonus, check out the OPML download page above to see a sneak peak at the new layout of BizTalkGurus.com!  The new look and feel will be going site-wide in the near future.  Feel free to post any comment of what you like or don’t like!

PRO EDI in BizTalk 2006 R2 Book Now Available

PRO EDI in BizTalk 2006 R2 Book Now Available

I just noticed Amazon.com has a new BizTalk book available.  It is called PRO EDI in BizTalk Server 2006 R2 by Mark Beckner. 

I have not had a chance to look at this book myself, but with the new EDI changes in BizTalk 2006 R2 I’m sure this book would be a valuable resource – if you had to do EDI….

Please post any comments if you have read or reviewed this book and let us know what you think about it.

ProEDI

Working with the BizTalk WCF Adapter on Windows XP

WCF support through the different WCF Adapters provided in BizTalk R2 is a powerful new feature.  With the announcement of Oslo, working with the WCF Adapters now is even more critical to a BizTalk Developer.


If you are like me, you do a majority of your BizTalk work on a Windows XP computer or laptop.  This can cause some problems when working with the WCF Adapters.


Lets take a look at what needs to be done in order to work with WCF and BizTalk on Windows XP.


First, lets look at the core issue – lack of Application Pools in Windows XP.


Here is what you need to do first in order to work with the WCF Adapters (using IIS – probably the most common scenario for beginners).


– Add your ASPNET user to the Isolated Host Users group


– Make sure your Receive Location is enabled


– Make sure the address in your Receive Location is correct – looks like “/BizTalkWcfServer1234/Service1.svc”


– Restart IIS


 


Important Note: You can only run one type of WCF Adapter per Application Pool.  So on XP, you can only run one type of WCF Adapter at a time.  If you want to switch from WCF-BasicHttp to WCF-WSHttp you will need to restart IIS. 


On Windows 2003 boxes, each Adapter you want to run through IIS will need a different Application Pool in order to have them co-exist.


Of course, you can always use the Customer Adapter and do anything you want inside that adapter.  That adapter is not as user friendly and not really a good place to start for beginners.


 


Below is a list of common WCF Errors you might encounter when working with the WCF Adapter.  In most cases, the error messages give you enough information to correct the problem.


WCF Adapter Common Errors (the error messages are very specific and tell you what to do to fix the problem):


The Messaging Engine failed to register the adapter for “WCF-WSHttp” for the receive location “/BizTalkWcfService1234/Service1.svc”. Please verify that the receive location exists, and that the isolated adapter runs under an account that has access to the BizTalk databases.


Potential Causes: Application pool user doesn’t have correct permissions, Typo in the Receive location name


 


The Messaging Engine failed to register an adapter “WCF-BasicHttp”. Details: “Registering multiple adapter types within the same process is not a supported configuration. For e.g. HTTP and SOAP receive adapters cannot co-exist in the same process”


Potential Causes: Already have a different adapter type loaded into IIS, Adapter binding types do not match


 


Receive location for address “/MyService.WCF/MyService.svc” not found. (The BizTalk receive location may be disabled.)


Potential Causes: Receive location disabled, Typo in Receive Location name

Visual Studios 2008 and BizTalk – Think Again

Yesterday, Visual Studios 2008 and the .Net Framework 3.5 was released by Microsoft.

I, of course, immediately download the Team Suite edition from MSDN and installed it on a Virtual Machine.  Then, went about my daily business of opening up a BizTalk project to get some work done. 

The project conversion wizard opened and ran but the projects were unable to open inside Visual Studios.  This really wasn’t a big surprise and doesn’t cause me much pain since none of my projects are working with Visual Studios 2008 yet.

I found a news group post that said a patch for BizTalk might be coming out at some point to allow it to work with Visual Studios 2008.  But I have not heard anything about a timeline.

To summarize, have fun working with Visual Studios 2008 but keep in mind you might have a hard time doing BizTalk development.

Upgraded to Community Server 2007 – How’s things working?

Today (on Tuesday November 6th) I have upgrade the blogs and forums of BizTalkGurus.com to the newest version of Community Server 2007. 

You may have noticed the site was down for about an hour during the upgrade and everyone will have to login again.

Please post a comment here or send me an email if you have any problems with the upgrade.

The only problem I seem to be having is I keep getting logged out every few minutes.  If anyone else has this problem, let me know.

All my forum and blog templates have been reset to the base layout.  So over the next few days (ok maybe week or two) I’ll up trying to get them back to normal or at least updating them to something other than the default.

I’m also thinking of removing or stopping the aggregated blog posts I have on the site (http://www.biztalkgurus.com/blogs/biztalksyn/). 

Does anyone use this feature of the site?  Love to get some feedback on this.

Thanks.