locked
How to build and deploy the WCF service? RRS feed

  • Question

  • Hi,

    I am completed my coding my WCF service and tested it by creating the in the same solution.

    Now, I want to host the service in the IIS 6.0 or IIS 7.0 to be available for the company intranet access. 

    Please any can help me in building/deploying and hosting the service. I am looking for the complete steps for hosting it.

    Thanks in advance,

    Regards,

    Afreen

    Monday, February 20, 2012 2:54 AM

Answers

  • Hosting and Consuming your service 

    http://msdn.microsoft.com/en-us/library/bb332338.aspx

    See the below link from msdn that tells you different ways to host your service. See How to host service in IIS 

    http://msdn.microsoft.com/en-us/library/ms730158.aspx

    I havent watch this screencast... but may be helpful 

    http://www.youtube.com/watch?v=mX8quq7MoeI


    Tanvir Huda Application Architect/Consultant

    • Marked as answer by Yi-Lun Luo Friday, February 24, 2012 8:05 AM
    Monday, February 20, 2012 3:33 AM
  • Hello,

    Just follow the below steps to host your service on IIS

    1) check if IIS is installed in your pc or not. If not then first install it

    (control panel -> Program and Features -> Trun windows Features -> IIS)

    2) Now If you have installed ASP.NET before IIS Installation then reintall it because otherwise it gives you error in you will host your service on IIS

    (open command prompt as administartor-> and run this command C:\Windows\Microsoft.NET\Framework64\v4.0.30319>asp.net_regiis -i )

    3) Now create one folder namd Host(or whatever) in c:/inetpub/Host

    4) Now publish your WCF service

    (right click on wcf service application project and select publish -> select File System in publish method combo box -> set target location as c:/inetpub/Host)

    5) Now Open IIS (startmenu -> write IIS in SearchProgram and open IIS)

    6) Create an applicaiton pool with apropriate framework (like 4.0 )

    7) Now create a website and select created pool and target location is as c:/inetpub/Host and at last give port number (ex. 2255) here make sure that the port number which you are going to assign to you service is not being used by for any other service.

    8) Press Ok. You have done.

     9) Now just browse you serivce by its url like http://localhost:serivceport/servicefilename.svc

    (ex http://localhost:2255/CalculatorService.svc)


    Regards, Hiren Bharadwa


    • Edited by Hiren Bharadwa Monday, February 20, 2012 5:29 AM
    • Marked as answer by Yi-Lun Luo Friday, February 24, 2012 8:05 AM
    Monday, February 20, 2012 5:25 AM

All replies

  • Hosting and Consuming your service 

    http://msdn.microsoft.com/en-us/library/bb332338.aspx

    See the below link from msdn that tells you different ways to host your service. See How to host service in IIS 

    http://msdn.microsoft.com/en-us/library/ms730158.aspx

    I havent watch this screencast... but may be helpful 

    http://www.youtube.com/watch?v=mX8quq7MoeI


    Tanvir Huda Application Architect/Consultant

    • Marked as answer by Yi-Lun Luo Friday, February 24, 2012 8:05 AM
    Monday, February 20, 2012 3:33 AM
  • Hello,

    Just follow the below steps to host your service on IIS

    1) check if IIS is installed in your pc or not. If not then first install it

    (control panel -> Program and Features -> Trun windows Features -> IIS)

    2) Now If you have installed ASP.NET before IIS Installation then reintall it because otherwise it gives you error in you will host your service on IIS

    (open command prompt as administartor-> and run this command C:\Windows\Microsoft.NET\Framework64\v4.0.30319>asp.net_regiis -i )

    3) Now create one folder namd Host(or whatever) in c:/inetpub/Host

    4) Now publish your WCF service

    (right click on wcf service application project and select publish -> select File System in publish method combo box -> set target location as c:/inetpub/Host)

    5) Now Open IIS (startmenu -> write IIS in SearchProgram and open IIS)

    6) Create an applicaiton pool with apropriate framework (like 4.0 )

    7) Now create a website and select created pool and target location is as c:/inetpub/Host and at last give port number (ex. 2255) here make sure that the port number which you are going to assign to you service is not being used by for any other service.

    8) Press Ok. You have done.

     9) Now just browse you serivce by its url like http://localhost:serivceport/servicefilename.svc

    (ex http://localhost:2255/CalculatorService.svc)


    Regards, Hiren Bharadwa


    • Edited by Hiren Bharadwa Monday, February 20, 2012 5:29 AM
    • Marked as answer by Yi-Lun Luo Friday, February 24, 2012 8:05 AM
    Monday, February 20, 2012 5:25 AM