I added MSMQ to my WCF web service (which was running OK) by adding the following endpoint to the service in web.config file
<endpoint
address="net.msmq://server/private/queue1"
binding="netMsmqBinding"
bindingConfiguration="MsmqConfiguration"
contract="ITestQueue" />
I also added the following binding
<netMsmqBinding>
<binding name="MsmqConfiguration"
exactlyOnce="false">
<security mode="None"/>
</binding>
</netMsmqBinding>
Once I deployed the Wcf service on Windows Server 2008, I also enable net.msmq on the website using the following command
appcmd set app "localhost/service" /enabledProtocols:net.msmq
However when I try to point to the svc file from my browser I got an Error 503 instead. Removing the MSMQ endpoint and I have the service up and running again.
After that I have a look at the website via the IIS Management Console and I realize that http protocol is not enabled for the website anymore
A normal web app will have http protocol such as below
At last I figure out that the appcmd actually overwrote the settings instead of adding on to it. So the correct appcmd command is:-
appcmd set app "localhost/service" /enabledProtocols:net.msmq, http
And I have the site running again with both http and msmq protocol enabled.