How to deploy a VS 2008 web service?

Discussion in 'ASP.NET WebServices' started by Spanky, Dec 7, 2009.

  1. I have a local web application that consumes a local http web service through a web reference. I knwo how to publish the web application to the discountasp site, is the web service publishing the same? What other steps will I need to take? Is there a kb article or forum post someone know about that describes this?

    Thanks // :)
     
  2. Got it!

    1. Create your local Web Service project in VS2008.
    2. Create your local Web App project in the same VS2008 solution file.
    3. Create methods in the Web Service project.
    4. Add a web reference to that project in the Web Application project.
    5. Test it, debug it, get it workig locally.
    6. Change the url in the Web Service project's .asmx.cs file to be the one you will publish at your.domain.com and add the name of the .asmx file: http://www.domain.com/Service.asmx
    6. Publish the Web Service project by right clicking it and selecting Publish...
    7. Do what is needed to ftp publish to the site just like with a Web Application.
    8. Come back to your earlier made Web Reference in the Web Application and delete that and then delete it's enclosing folder.
    9. Add a new Web Reference to your Web Application that points at the published url of your Web Service.
    10. Verify that your namespace referencing in your Web Application to that Web Service is still valid. Fix as needed in your Web Application's .cs files.
    10. Build your Web Application and run it locally.
    11. When it works, right click it's project and Publish...
    12. It should work correctly at the published URL and access your published Web Service now :)
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    thanks for posting follow up.
     
  4. Pauldaniel

    Pauldaniel Guest

Share This Page