Hosting WCF Service on IIS 7.0/7.5 !

Assuming that you have a WCF Service code ready and you are ready to HOST it on IIS and test it.

Make sure you have IIS installed and configured on the machine. If not, click here for the guide.

Stepwise Guide: (Might be too detailed for some ! :))

  • Create a folder on your machine where you want the published code to be saved/maintained. It can be any drive location on your machine.
  • Now, Open the WCF service code in Visual Studio and right click on the WebService Project and click on Publish.


  • Publish Web dialog box will open. Select <New> from the drop down and enter a name for the publish profile and click on OK.


  • In Connection Tab, select Publish Method as ‘File System‘ from drop down and browse Target Location to the folder where you published the code.



  • In Settings tab, select Configuration as ‘Release’ from drop down. Click on Publish. The code will be published to the selected location.


  • Now open IIS by entering InetMgr in the Run prompt. IIS Manager will open. Go to the Default Web Site, right click on it and select ‘Add Virtual Directory’.


  • Enter a proper Alias Name and browse the Physical Path to the location where code was published and click on OK.


  • A new Virtual Directory will get added to the Default Web Sites with the Alias Name entered in the step above. Right click on the directory and select ‘Convert to Application’.


  • Click the Select button for Application Pool and select ‘ASP.NET v4.0’ from the drop down. This is to make sure that the correct Application Pool is selected for the web service. You may select the application pool as per the ASP.NET framework used for creating the WCF service.



  • The virtual directory icon will change to application icon and the service can be browsed now. Right click on the .svc file and click on browse. The service should be up and running.

host5 host6

Please like / share / comment.

Thanks for checking out !

All comments.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.