Search code examples
wcfmsmq

Must use exact identifier for APP object with verb SET


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


Solution

  • @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.