Mapping to a VDir

When I run my non-HTTP service in IIS, I get an error message that the protocol is not supported. How do I add non-HTTP support to my VDir?

This is a two step process because the web site controls the list of available protocols while the application controls which of those protocols are enabled. You can change these settings either from the IIS control panel or from the command line. I’ll demonstrate setting this up with the command line. This assumes that you’ve installed the IIS scripting tools and have started an elevated command prompt.

The first step is to create a web site that has the protocol in its list. I’ll be using net.msmq in this example. If you’ve already got a web site, then you’ll be using set instead of add and change the command accordingly.

appcmd add site /name:"My Site" /physicalPath:"c:\mysite" /bindings:http/*:80:,net.msmq/*

The second step is to create an application that has the protocol enabled. Again, if you’ve already got an application, then you’ll be using set instead of add.

appcmd add app /"My Site" /path:/myapp /physicalPath:"c:\mysite\myapp" /enabledProtocols:http,net.msmq

Next time: Channel Bindings

Comments (5)

  1. kevindan says:

    Does this apply to IIS6/Windows2003/XP or IIS7/Longhorn/Vista?

    My previous understanding was that you have to do WCF service self-hosting on Windows2003/XP when HTTP is not used.

    Can IIS7/WAS run on Widnows2003/XP?

    Thanks for clarification.

    One of your blog subscribers,


  2. How does my service know the identity of one of the connecting clients? I’m going to focus this answer

  3. Nicholas Allen says:

    This applies to IIS7, which is available on Vista/LHS only.

  4. kevindan says:

    Thanks for the quick answer.

  5. Can I configure non-HTTP web service activation from the command line? Yes, and you don’t need any special