Saturday, July 14, 2007

My experience with BizTalk 2006 Enterprise Service Bus (ESB) Guidance

Marty Wasznicky and Don Smith have released the CTP2 version of the Enterprise Service Bus (ESB) Guidance. You can get it here: This is out of the box message repair and error handling solution prepared by Microsoft’s Patterns & Practices team.
It is happened that my current client is requesting such as functionality, so I downloaded and installed it on my VPC already with an idea to use it as a good start-point.
The installation of ESB is not easy. I chose to install core system with the source files. It is a solution with 23 projects, including BizTalk, C# and C++ project types, so if you got an error “Unable to load project” when you first time try to open your solution – that means that you are missing some of the Visual Studio 2005 components. In my case, I forgot to install C++, so “ESB.JMS.PipelineComponents” refused to load. I installed C++, but it takes 800Mb of my limited VPC's HD space, so I just removed C++ project from my solution instead (it is for MQSerios adapter anyway and I do not plan to use it in the near future). Talking about prerequisites: please read documentation first and try to follow it – you will save a lot of time later on.
Do not forget to change a target SQL Server name for each BizTalk project.Just goto project's Properties-->Deployment-->Server and replace original server name by your local name, or just type“.” Also, do not worry about missing strong key – they are presented and each project has inline notation with relative pass to the .snk file (you still have to unzip whole solution to the “C:/Projects” directory).
Finally, you opened your solution successfully. If you still fail to build then you probably missing some referenced components, so go to “C:\Projects\Microsoft.Practices.ESB\Source\Core\Install\Scripts” directory and prepare “PreProcessingCORE.vbs” for the run. I would recommend to check all paths and replaced “%programfiles%/BizTalk……” with the correct one, becouse if VBS script failes, it does it silently without creating important objects, like web-site or user. Also, I would recommend to enhanced it with comments, like this: Msgbox “User created” … - it was really helpful for me.
Next script to run is CORE_CreateBizTalkApplication.cmd . It failed to deploy solution, but I was able to deploy it manually from the solution level with no problem at all. Last step is to import binding file. Hint: do not forget to change some send ports and receive locations FILE adapter URI path to the correct one, because most of the ports are pointed to the “E” directory and my VPC for example has only one “C” drive. Now you are ready to go, just do not forget to restart a host instance.
Finally, the most interesting part - working scenario test.
My first application to run was “Repair and Resubmit Custom Exception Handler Sample”. The prerequisites does not look to complicated, so after running setup script I was ready to go and test how it works. However, when I tried to submit InfoPath form after repair, I got HTTP error 405 “Method Not allowed”:

That is because your virtual directory does not have execute permissions (by default):

After changing it to “Script and executables” I submitted my InfoPath form again hoping that all my problems are far behind. Not yet J . I got new HTTP error 404 “Not Found”:

Checking permissions of the “HwsMessages” virtual directory did not show any problems. Path was correct and pointed to the right DLL.
I spent some time before I realized what is missing. BizTalk HTTP Adapter is implemented as an ISAPI application. Make sure BtsHttpReceive.dll is an allowed Web Services Extensions in IIS.
To enable, launch IIS Manager and click on the "Web Service Extension" folder located below the "Web sites" folder in the navigation tree. If not found, add an entry by right click on the Web Service Extension folder. Select "Add a new Web service extension...”, give it an identifiable name such as "BizTalk HTTP Adapter" and add the path of BtsHttpReceive.dll (usually found on C:\Program Files\Microsoft BizTalk Server 2006\HTTPReceive\BTSHTTPReceive.dll)

No comments: