24 September 2004

BizTalk FAQ

I am working on a Biztalk POC project at the moment, here is a list of problems have occurred to me at varuious stage and the solutions. The list will keep growing as proceeding.

1. Biztalk Message Queue causes conflict with MSMQ
-- In short, you cannot run MSMQT on the same machine as MSMQ runs. What behind MSMQT is MSMQ, they are using the same port (1801). This can happen on the test/deployment machine if MSMQ already run then you configure to use MSMQT. This problem raised when you try to start Biztalk Application again.. Stop the MSMQ service (Message Queuing and Message Queuing Triger) from Service Control Console, then start the Biztalk Application will fix the problem.

2. Running an independet web service on the same development machine that has biztalk server and Sharepoint server installed. I was getting 404 'file not found' when requesting a web service.
--MS Development team suggest the stsfltr.dll ISAPI filter from sharepoint team services may cause the problem. I have tried remove this ISAP filter from IIS, problem solved. Read this KB

3. I drop the request xml into the receive port-bound dir, it has been processed but the resulted xml doc is not produced, why?
-- It is spot on that orchestration process picks up the request as it has been removed from receive port-bound dir. The first thing to check is the send port - outbound settings. Is the dir granted with appropriate write/modify access to the account that BiztalkServerApplication runs under? Is there any typo in the address URL send ports point to?
If you are using late bound, the problem is easy to rectify. Just stop the orchestration process, unlist it, correct the problem and restart the orchestration process- make sure all receive and send ports and enabled/started.
If the application is bound at the design time, there are few more things need to be done.
First on the development pc, open the source project, correct the problems and rebuild it.
Then on the deployment server, stop/unlist the problematic orchestration from the Biztalk admin console.
Then start the deploy wizard, remove the problematic biztalk assembly from the configuration database-you need to remove it from GAC as well.
Install the new compiled biztalk assembly.
Specify all late bind ports to the new orchestration process use Biztalk Explorer.
Enlist and start the orchestration process from Biztalk Admin console

Lesson learn: Always use late binding ports when permitted.

23 September 2004

ASP.NET Response.Redirect Server.Transfer Server.Execute not working

The symptom:
On completion of registration or login, I want to redirect the response to the page where user coming from, say default.aspx. I expect the QueryString ReturnUrl will be picked up and browser will be forwarded. However, the redirection is not working, working intermittently. Sometimes, the login page stayed as if not being refreshed, other times I got a blank page with url poited to the desired target. I have tried these methods Response.Redirect Server.Transfer Server.Execute and FormsAuthentication.RedirectFromLoginPage. None of them works. I was using Framework 1.1.

The solution:
1) Make sure your browser supports cookie. If you are using personal proxy, such like ZoneAlarm, check to see it will not block cookies even from localhost.
2) Check to see SmartNevigation is set to off in the web.config. If it is on, the page redirection will fail. Debug trace shows the Application_BeginRequest wouldn’t even be hit.

11 September 2004

CMS SCA Host Headers Mapping vs IIS HTTP Host Headers Mapping

MCMS Server Configuration Application (SCA) has an option to map channel names to host headers names. It can be used to allow host multiple CMS web sites with different domain names on the same CMS server.
To do this, we need to map top-level channels as the root channels for a URL with a host header name that is identical to the channel name. When CMS generates a URL pointing to an item inside the virtual site www.CMSsite1.com, it prefixes the URL with the name of the channels in which it is contained.’ See chapter 18 of book Microsoft Content Management Server 2002
There are two points need to note:
1. Names of top channels on a CMS server must match the virtual site names in IIS.
2. The virtual site names must be valid DNS name.

So a typical co-hosting configuration for three web applications on a development box can be:

In MCMS Site Manager:
We have three top channels, they sharing the same CMS database, and named as:

Install a network loopback adapter and assign IP address from

In IIS Manger, create three web applications named and assign IP address as:
www.CMSsite1.com (
www.CMSsite2.com (
www.CMSsite3.com (

Open %Winnt%\system32\drivers\etc\host with notepad and add following entries: www.CMSsite1.com www.CMSsite2.com www.CMSsite3.com

So you may ask how will this related to HTTP host header mapping in IIS?
Not a lot. IIS HTTP host header mapping is used to provide multiple-hosting. The HTTP host headers identify multiple virtual web sites that reside on one physical server and all sites shares same IP address.
However, you need to configure the HTPP host headers on the IIS site if a single IP address is used for multiple CMS sites.

06 September 2004

Pass another MCP exam

I passed the 70-320 MCP exam today, which is on Remoting, Serviced component, COM+, Windows services and XML web services. For the last 4 weeks or so, I totally enjoyed the pleasure of discovery. Ingo Rammer's Advanced .NET Remoting is inspiring and fun to read. I got the book off my boss and gave him back with some coffee stains ;-).
I reckon 70-320 is hardest one or at least it should be the hardest one to take, given the weight on each branch it tries cover. In a sense, Remoting and serviced component are the same hierarchy of .NET technology tack, like ASP.NET. However, 70-320 covers far more than that, which dilutes the depth it can accommodate in a two hours session.
Serviced Component, the .Net version of COM+ is still the toughest part. I used Juval Lowy’s Programming .NET Components and Chapter 10 of his COM and .NET Component Services as introductory.
If I were not heading for exam, I can probably explore more in-depth rather than board coverage. This is particular important to COM+ bit, which is hard to pick-up yet easy to drop-off.
Now the challenge is: will I utilise these knowledge and skills and keep them sharp?

04 September 2004

Should I use SetAbort()/SetComplete() or DisableCommit()/EnableCommit()?

It was originally from a MCP vendor exercise question. I have it modified slightly:

You are creating a serviced component named UserManager. UserManager adds user
accounts to multiple transactional data sources.
The UserManager class includes the following code segment:

[ObjectPooling(true, MinPoolSize=1, MaxPoolSize=50)]
public class UserManager : ServicedComponent {
public void AddUser(string TestKname, string TestKpassword)
// Code to add the user to data sources goes here.

You must ensure that the AddUser method reliably saves the new user to either all data
sources or no data sources. What should you do?
A. To AddUser, add the following attribute:
B. To UserManager, add the following attribute:
C. To the end of AddUser, add the following line of code:
D. To the end of AddUser, add the following line of code:
E. To the end of AddUser, add the following line of code:
ContextUtil.MyTransactionVote = true;

IMHO, there are two issues need to be addressed here:
1. Object activation and pooling. .NET 247 : object persistence across client method calls discusses this issue. Basically, the ‘done’ flag decide whether an object is ‘done’ and can be deactivated.
2. MyTransactionVote or consistent flag.

The SDK Doc says, ‘When MyTransactionVote is set to Commit, the COM+ consistent bit is set to true and the COM+ context votes to commit the transaction. If MyTransactionVote is set to Abort, the consistent bit is set to false and the COM+ context votes to abort the transaction.’

And here is matrix of the four methods:

The question is about when and how to do 1) ‘all or not’ transaction; 2) object activation and pooling.
EnableCommit() cast a 'go' vote for transaction yet maintain the object as activated so C will be the best answer.