Saturday, April 25, 2009

MSMQ 4.0 Queue name with .svc

In MSMQ 4.0, if you have a queue name with .svc at the end, you may need to do some additional steps to deliver your messages to receiver over http.

Fix:
  1. Uninstall your WCF components and MSMQ HTTP feature.
  2. Install MSMQ http feature first
  3. Then Install WCF components

This is bug in MSMQ 4.0 and is well explained in the following kb article.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;936502

Basically if you install WCF components before Message Queuing HTTP Support feature (or even together), then the handler mappings are created for the request path whose name contains ".svc" when you enable the WCF feature. The handler mappings are in the Internet Information Services (IIS) default Web site. When you enable the Message Queuing HTTP Support feature, the handler mappings are copied to the Message Queuing virtual directory. This behavior occurs before the Message Queuing HTTP handler mappings are created for the Message Queuing virtual directory. Therefore, any Message Queuing HTTP request to a queue whose name contains ".svc" is sent to the WCF handlers instead of to the Message Queuing HTTP handlers.

Hope this helps.

Saqib