How to deploy asp dot net webservice in IIS

In this post we are going to discuss about how to deploy asp dot net webservice we created in the previous post – How to create webservice in asp.net using csharp in IIS. Follow below steps to deploy webservice in IIS.

Step 1: Open IIS Manager

Open run, type ‘inetmgr’ and hit enter. It will open up ‘Internet Information Services(IIS) Manager window where we have to configure and deploy the webservice application.
webservice_deploy_1

Step 2: Add application

Right click on ‘Default Website’, select ‘Add Application’:
webservice_deploy_2
Enter Alias name as ‘MyFirstWebService’ and select the physical path as the path where the webservice we created resides.
webservice_deploy_3

Step 3: Browse Service.asmx file

Click on MyFirstWebService application we created and change to ‘Content View’. Right click on ‘Service.asmx’ file and select Browse.
webservice_deploy_4
You could see the below screen where the list of operations available in the service we created will be rendered for testing purpose.
webservice_img_4

Step 4: Test Webservice

It’s time to test the webservice we created, click ‘sayHello’ operation. It will open a web page the webmethod invocation can be done.
webservice_img_5
Enter name in the name textbox and click invoke button. It will open up new window where the response will be rendered as XML.
webservice_img_6

Author: Udhay

Share This Post On
  • Alex

    Very useful article…Thank you for sharing it.

  • MyQuestion

    what version of Visual Studio was used to develop this Web Service?
    Thanks in advance!

    • admin

      I used Visual Studio 2010 to develop this web service. Here version doesn’t matter I believe.

  • Jiki

    Hey I’m getting this error when I want to browse my .asmx file :(

    https://imagizer.imageshack.us/v2/1564x762q90/713/vs6f.png

    I’ve added the IIS_IUSRS to the config permissions but it still doesn’t work, anyone know a solution?

  • Jane

    hello everyone,, do i need to plug in my android phone to the computer while making this first app? thanks

  • Pravin

    Nice Tutotial……….

  • http://programmerguru.com/ Android Guru

    Thanks,

Pin It on Pinterest

Shares