Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF service hosted in IIS with net.msmq binding creating trouble

Tags:

c#

iis

wcf

msmq

I have a WCF Queue Listener service that picks messages from MSMQ. Its working fine no problem . But i dont know what IIS does, it creates wired problem many times. I can browse the service but when i refresh this it disappears. But again if i refresh after a second it comes back with no problem this problem is persisting.

I did a close monitoring of this. if i create a request within less than a second it fails to process this but if i request it after a second it comes fines.

I know this sounds stupid but until you have had this problem you will not understand.

Has anyone solved this issue before?

like image 213
Bravo11 Avatar asked Jul 19 '13 03:07

Bravo11


People also ask

Can I use IIS hosting with WCF?

This hosting option requires that IIS be properly configured, but it does not require that any hosting code be written as part of the application. You can use IIS hosting only with an HTTP transport. For more information about how WCF and ASP.NET interact, see WCF Services and ASP.NET. For more information about configuring security, see Security.

How do I enable MSMQ in WCF net?

In Enabled Protocols add net.msmq along with http, It will enable net.msmq protocol for our application. Now check whether configured site is working or not, Right click on ‘WCFNetMSMQ’, expand ‘Manage Application’ and click on ‘Browse’.

Does a WCF service need to be hosted?

A WCF service that runs in the IIS environment takes full advantage of IIS features, such as process recycling, idle shutdown, process health monitoring, and message-based activation. This hosting option requires that IIS be properly configured, but it does not require that any hosting code be written as part of the application.

How to create a queue service in WCF using WCF?

Enter ‘services.msc’ and press ‘OK’ button, it will open Services window. Select ‘WCF’ from left panel, select ‘WCF Service Application’, Provide appropriate name, select the location and press ‘OK’ button, Right click on interface IService1 and rename it to IQueueService, Right click on Service1.svc and rename it to ‘QueueService.svc’,


1 Answers

It happened to me and we noticed that there were a lot of messages accumulated in the queue. Try cleaning the queue and restarting the msmq. This definitely works.

like image 138
adglopez Avatar answered Oct 10 '22 19:10

adglopez