locked
Script for deploying WCF Service in IIS. RRS feed

  • Question

  • Hi,

    I want to create a deployment script for hosting WCF to IIS. (It can also be a batch file).

    In my project,
    I have many WCF Services that are to be hosted on IIS on different ports.

    These services are consumed from client where we have to modify web.config for the corresponding service.

    So, how to proceed ?

     

    Thanks.


    Kunal G
    Tuesday, August 30, 2011 1:20 PM

Answers

  • Since you are running WCF in IIS, you can use the packaging mechanism of VS that creates a deployment package. The deployment package can be manually installed in IIS servers and can also be installed through command line with the help of the MSDeploy utility:

     

    http://www.iis.net/download/WebDeploy


    Please mark posts as answers/helpful if it answers your question.
    Senior Consultant on WCF, ASP.NET, Siverlight, and Entity Framework. Author of Microsoft's Official WCF 4 Course. Co-author of the Microsoft HPC/Azure burst whitepaper.
    Visit my blog: http://blogs.microsoft.co.il/blogs/idof
    Tuesday, August 30, 2011 1:46 PM

All replies

  • Since you are running WCF in IIS, you can use the packaging mechanism of VS that creates a deployment package. The deployment package can be manually installed in IIS servers and can also be installed through command line with the help of the MSDeploy utility:

     

    http://www.iis.net/download/WebDeploy


    Please mark posts as answers/helpful if it answers your question.
    Senior Consultant on WCF, ASP.NET, Siverlight, and Entity Framework. Author of Microsoft's Official WCF 4 Course. Co-author of the Microsoft HPC/Azure burst whitepaper.
    Visit my blog: http://blogs.microsoft.co.il/blogs/idof
    Tuesday, August 30, 2011 1:46 PM
  • Thanks..

    Is there any other approach?


    Kunal G
    Wednesday, August 31, 2011 10:01 AM
  • Hi Kunal,

    For deploying WCF into IIS host, the main tasks to do is xcopy those WCF service component files and set the proper IIS site/application configuration.

    As for IIS 7, there are appcmd.exe commandline tool for you to set configuration over site/virtual directory. And if windows powershell is used in your scenario, the IIS 7.0 powershell snap-in can also helps much:


    #AppCmd.exe
    http://learn.iis.net/page.aspx/228/appcmdexe/

    #Managing IIS with the IIS 7.0 PowerShell Snap-in
    http://learn.iis.net/page.aspx/447/managing-iis-with-the-iis-70-powershell-snap-in/

    If you want to further customize some portion of the web.config file, powershell also support custom code(with .NET framework code syntax).


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Tuesday, September 6, 2011 10:35 AM