2
votes

I'm following this article on allowing WCF to read data from MSMQ but am getting an error with this command

appcmd set app "MSMQ/MsmqService" /enabledProtocols:net.msmq

MSMQ is the name of my IIS hosted website and MsmqService is the name of the .svc file.

The error I get is

ERROR ( message:Must use exact identifer for APP object with verb SET. )

Here is what my site looks like in IIS

iis

2
Your Web Site is called MSMQ and not Default Web Site (or similar)?Kieren Johnstone
Yep = that's correct.Sachin Kainth

2 Answers

4
votes

I ran into this today, so here's the fix for the "Exact Identifier" error:

Change

"MSMQ/MsmqService"

To

"MSMQ/MsmqService/"

appcmd simply expects a path that includes a slash at the end (exact identifier).

2
votes

@Sachin, All you are trying to perform by running this command is to set net.msmq in the enabled protocols of the virtual directory. In this specific command the MsmqService is the name of the vDir under your web site MSMQ. If you create a vDir with name MsmqService and execute this command the command will succeed (not the svc file name). And svc files should have the .svc extension for IIS to be able to invoke the appropriate handlers when a request arrives.

Alternatively you can do the same thing in IIS UI following these instructions:

  1. inetmgr from run prompt
  2. Go to the web site MSMQ
  3. Navigate to the vDir MsmqService. Right click -> Manage application -> "Advanced settings..."
  4. Notice a setting named "Enabled Protocols". Type in net.msmq there. Hit OK.