How to deploy WCF Rest Service application to the IIS ?


  • Hi,

    I created a new 'WCF Rest Service application' project using VS 2010. Out of the box configuration, start in debug mode and its working fine using url like http://localhost:12345/Service1

    I published the same project to a local IIS server (the one that comes with win7) and after that I have the following folder structure:


      + WcfRestService1.dll

      + WcfRestService1.pdb




    I can browse the main directory of the application, but when I follow the url like http://localhost/Service1 I receive the 404 error.

    I tried different URLs but no luck and its kind of pointless. I would like to more understand the deployment process. Can anybody

    provide any help ?


    Thank you,



    Sunday, August 08, 2010 6:43 PM

All replies

  • Hmm another thought, maybe it will help.

    An address like http://localhost/Service1 has no extension like .html or .aspx so I guess IIS has no clue how to handle

    this particular request. I'm wondering how to tell IIS that it should execute the code that is located in bin/WcfRestService1.dll

    How to define such a mapping ?


    Thank you,


    Sunday, August 08, 2010 7:00 PM
  • Hello! You should create a .svc file, for example Service1.svc. This file must contain something like this:

    <%@ServiceHost language=c# Debug="true" Service="YourNamespace.YourServiceImplentationType"%>

    For more information about deloying WCF Services in IIS please visit http://msdn.microsoft.com/en-us/library/ms733766.aspx.

    Kind Regards, Grigory

    Monday, August 09, 2010 8:35 AM