Publishing and using a Biztalk Scema using the WCF-WSHttp adapter

This morning I had to expose a Biztalk Schema using the  BizTalk WCF Service Publishing Wizard, this wizard is pretty straightforward and I will not discuss how to use this wizard. Well after I generated my WCF service the fun started.  This blog entry will describe the issues I encountered and how I resolved them.

Attempt 1 : Accessing the WCF generated service

So I just generetared a WCF service, and when I tried to access it I ran into the following issue: "The Messaging Engine failed to register the adapter for "WCF-WSHttp" for the receive location "/BizTalkWcfService/svcManager.svc". Please verify that the receive location exists, and that the isolated adapter runs under an account that has access to the BizTalk databases."

The error as described above is pretty clear and more or less it comes down to the fact that the service account which the application pool of the website uses no rights has to access the Biztalk Resources (databases). In order to resolve this issue I defined a new application pool in IIS, and ensured that it would run using a security account with sufficient rights to access the Biztalk resources . Below I wrote down the steps I performed to resolve this issue

Define an application pool with sufficient rights to use the Biztalk resources 

1. Open up the IIS Manager and expland the Application Pools folder.
2. Right-click and select new -> Application pool

  

3. A popup appears, now give the to created application pool a unique name (ID) and use the default settings for the new application pool and press OK

 

4. A new application pool has been created, now open it again by selecting the appliction pool (right-click -> properties).
5. Within the Properties screen go to the identity tab, check the configurable option and select an user-account which has the appropriate rights

 

6. Once done, press OK and now go to the website (or virtual directory) which will host the WCF service and select its properties and select the 'Directory' tab.
7. Within the properties screen, change the application pool so that it will use the earlier defined application pool (stel 5)

 

8. Press OK and now your application will be running in an application pool which has sufficient rights to access the Biztalk resources.

Attempt 2 : Accessing the WCF generated service

So I fixed the application pool issue, but when I tried to access the WCF service I ran into the following issue: "This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection. Parameter name: item.". 

Ah yippy I thought and started up a new browser session and decided to Bing this issue, and behold I ended up reading a the following blog entry "Words of wisdow from the Elder", with the solution, in short the error as described above occurs whenever you have multiple identities using the same website (for example; application A om port 80 and application B op port 8080, both using localhost / 127.0.0.1). Below a bried summary which explains who to fix this error

Hosts File and baseAddressPrefixFilters

1. Add a line to your windows\system32\drivers\etc\hosts file, which results in being able to resolve to your own machine other then 127.0.0.1 or localhost. 

2. Once you added the enty save the file and open up the commandline and try to ping your machine, using the name you just added in the hosts file (in my case I used; biztalkPOC) 

 

3. You should have been able to ping yourself. Now it is time to ensure that your wcf service can be accessed locally using this newly created hostname. In order to do this we will have to open up the IIS Manager, select the website which hosts the WCF service and assign the new host name. You do this by selecting the website properties (right-click) and click on the advanced button which can be found on the Web Site tab.

 

4. A screen called 'Advanced Web Site Identification' will pop up and the first thing you should notice that there will be mulitple entries and none of these entries have a host header value assigned. 

5. Select that entry with is used by your WCF service (in my case the WCF service is listening on port 80), click on the edit button and assign a host header value and for this you will use the name you used in step 1 (in my case; biztalkPOC)

 

6. Click Ok and now open up the web.config file of your wcf service.
7. Add the following entry within the <system.serviceModel> element (Please ensure you have .net 3.5 framework installed!)

<serviceHostingEnvironment>
    <baseAddressPrefixFilters>
        <add prefix="http://biztalkPOC/<path to your wcf service>"/>
    </baseAddressPrefixFilters>
</serviceHostingEnvironment>

 

8. Save the webconfig. Go back to the IIS Manager, select your application pool and recycle it.

Attempt 3 : Accessing the WCF generated service

Well after fixing the app-pool thingy and the hosts file thingy it was about time to give it another go, and yes this time everything was working! 

Today's lesson learned

Using a wizard is easy, but usually you will have to do some magic yourself in order for it all to work.

 


Rene posted on October 9, 2009 13:53


Today I downloaden BTS 2006 R2 SP1 (beta) and installed it in one of my development Biztalk VPC's. So far I have not been able to actually play around with this latest version, but I will be continuing my POC using this latest release. This POC involves Sharepoint, Biztalk and some 3rd party API's (like twitter), but more on this in a future blog posting Wink.

A guide for this service pack is also available in this download. This guide contains important information to read before you install SP1.  It also provides installation instructions and a section on troubleshooting installation problems. Finally, it contains a section on known issues in this service pack release. Below the official description taken from Microsoft Connect with regards to the BTS 2006 R2 SP1 (beta) release. (Note I changed the links as the hotfixes link did not work)

"Microsoft BizTalk Server 2006 R2 Service Pack 1 (SP1) is an update for BizTalk Server 2006 R2.  It includes fixes to issues that have been reported through our customer feedback platforms, as well as internally discovered issues. To see a listing of the customer-reported issues that are fixed in this service pack, go to http://support.microsoft.com/kb/974563.  For a description of some of the other updates included in this service pack, see What's new in BizTalk Server 2006 R2 SP1 (http://msdn.microsoft.com/en-us/library/ee532481(BTS.20).aspx)." 

Anyway today I'll be summarizing my installation experience of BTS 2006 R2 SP1 (Beta). First of all I read 'the guide containing important information which was recommended to be read before installing'.

One of the things I've learned is that it never harms to read such information, actually most of the times it eliminates installation issues which you would encounter in case you would not have read the information.

Before we proceed I just would like to mention that it is a good practice to backup your development environment, in my case I did not do this as I was working with a copy of my original VPC. Laughing As it is Friday and I don't feel like typing a lot today I will continue with explaining my installation experience using screenshots (enjoy). Please note that I skipped a few steps which are mentioned in the guide, reason for this is that they were not applicable for me)

 Step 1 : Read the manual

Step 2: Disable receive locations 

Step 3: Stop Biztalk service and change startup type to manual

Step 4: Stop the WWW Publishing service and set startup type to manual 

step 5: Ensure that the SQL Server is running 

Step 6: Ensure that the SQL Server databases and services are running 

Step 7: Start the installation

Step 8: Accept the license agreement

 

Step 9: Continue with the installation 

Step 10: Accept the fact that some services will be restarted

 

Step 11: Enjoy the show 

 

 

 

 

 Step 12: Finish the installation

Step 13: Reboot

 

Step 14: Undo step 2, 3 en 4

 - Enable the receive locations
 - Start the BTS service and set it to be started automatically
 - Start the WWW publishing service and set it to be started automatically

 

Well in-hind respect the installation went smoothly; starting today I will start playing around with it and in case I encounter any issues I will blog about them.

Anyway the lesson I learned today was:

 'Don't blog on Friday Tongue out'

Have a nice weekend!

 


Rene posted on October 6, 2009 11:06

This morning I decided it was time to set up a Virtual PC and install Biztalk Server 2006 R2 on it. I've done this several times and up to today I never encountered any installation issues. Well up to now...

I started out by using an existing Master VPC which I had laying around, it was a clean VPC (well at least that´s what I thought Innocent) and it was running on Windows Server 2003R2 with SP2. Soon after I remembered the admin password I logged on and started installing the pre-requisites. This time I decided to use the manual 'Installing and Configuring Biztalk Server 2006 R2 on Windows Server 2003' Everything went just great untill I had to install SQL Server 2005, normally not a big deal (especially if you install it on a development VPC Wink)

Boy I was wrong; it simply failed on me...  

Luckily I was able to resolve this issue rather fast as I remembered the lesson I learned a few years ago.  'Check the Event log, look at the first error and go from there. Remember google bing is your best friend!' And so I did.

I opened up the event log and backtracked the first error I got while I tried to install SQL-Server (to determine the time, I checked the SQLServer installation log file). The error I found simply stated 'Product: Microsoft Office 2003 Web Components -- Error 1706. Setup cannot find the required files.' Hmmm I thought so it says that it cannot find the required files. Well and then it hit me; what if the Master VPC I used was not as clean as I thought?

So I went into the 'Control Panel - Add or Remove Programs'  and surprise what did I see? A previously installed version of the Microsoft Office 2003 Web Components.

 

My instinct told me that I should press the remove button Tongue out and so I did. Once deinstalled I reckoned let's be sure to use the latest version of the before mentioned web components so I downloaded and installed it manually. And behold the installation went smoothly afterwards!

 

The only thing I don't get is, why didn't the SQLServer installer remove the old Microsoft Office 2003 Web Components itself and then install the latest one?

Anyway the lesson I learned today was:

 'Simply do not assume that a Master VPC is as clean as a whistle, always double check


Categories

Calendar

«  March 2010  »
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234
View posts in large calendar

Authors

Month List

Recent Comments

Banners

Theme Grabber
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Wren's world