开发者

Message not getting to service

I have a WCF service using netMsmqBindin开发者_运维百科g and a client consuming it. I send a message to the service using the client and it gets to the message queue but the service is never activated. I've tried setting break points, exceptions in the constructor, setting the wildcard on the action and a few other things but the service never does anything. The message sits in the message queue.

The message goes into the queue even if I disable IIS.

What am I missing?


I don't believe an MSMQ binding will automatically work in a WCF service hosted in IIS. I believe you have to use Windows Activation Service (WAS) within IIS, or some other mechanism to get it to work. This article might give you some info to start with:

http://blogs.msdn.com/b/tomholl/archive/2008/07/12/msmq-wcf-and-iis-getting-them-to-play-nice-part-1.aspx


Is your service hosted in an application or under a root site node? If not in an application then create one, move the service and use these commands in command prompt (admin mode)

appcmd set site "servicesite" -+bindings.[protocol='net.msmq',bindingInformation='localhost']
appcmd set app "servicesite/svcapp" /enabledProtocols:net.msmq

where servicesite and svcapp are the names of your IIS site node and application node respectively.

Access your service via web browser and see what you get.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜