You must Sign In to post a response.
  • Category: Webservices

    How to create web services


    i am using VS2010 WITH C#..... i am new in web services..... please tell me step by step process of how to create web services and how can install it and how can access it.......... i know windows services...... i am working in windows services but i dont know web services...... please help me

  • #758741

    Hi Ramya,

    To create the Web service
    1. In Solution Explorer, right-click the Web site name (http://localhost/TemperatureWebService), and then click Add New Item.
    2. Under Visual Studio installed templates, click Web Service, and then in the Name box, type Convert.
    3. Make sure that the Place code in separate file check box is selected, and then click Add.

    1. Add the following code inside the class, after the HelloWorld method:
    public double FahrenheitToCelsius(double Fahrenheit)
    return ((Fahrenheit - 32) * 5) / 9;

    public double CelsiusToFahrenheit(double Celsius)
    return ((Celsius * 9) / 5) + 32;

    2. After you have entered the functions, save the file.

    To test the Web service:

    1. In Solution Explorer, click Convert.asmx, and then press CTRL+F5.
    The Web service is invoked and a page appears in the browser that shows the methods that are exposed by the Web service.
    2. Click CelsiusToFahrenheit, which invokes that method.
    A page appears that prompts you for parameter values for the CelsiusToFahrenheit method.
    3. In the Celsius box, type 100, and then click Invoke.
    A new window appears that displays the XML that the Web service returns when the CelsiusToFahrenheit method is invoked. The value 212 appears in the XML.
    4. Close the browser that contains the method results.
    5. In the original browser, click Back to return to the list of methods.
    6. Click FahrenheitToCelsius and test to make sure that the method is returning the results that you expect.
    If you type 212, the FahrenheitToCelsius method will return 100.
    7. Close the browser.

    You have finished creating the Web service; the next step is to use it.

    For more reference follow the below link:

    Hope this will help you.
    Mark the answer if it helps you.

    Nirav Lalan
    DNS Gold Member
    "If you can dream it, you can do it."

  • #758742

    Hi Ramya.

    I have written one nice article on webservices for beginners like you.
    You can even create by yourself if you go through the below article.
    In the article I have explained clearly step by step how to create a webservice and how to consume the created webservice with the help of client application.
    Refer the below link to read the article.

    If you have any doubts you can comment below of the article.


    DNS Member.
    "Hope for the best.. Prepare for the worst.."

    Sridhar Thota.
    Editor: DNS Forum.

  • #758768

    To create web services, check the following links

  • #763135
    Hi, Sorry to say that I have no idea regarding web services because I also use windows service from After reading this discussion, I got some idea about web services. So Thanks a lot to all for sharing ideas about web services and how to create it.

  • Sign In to post your comments