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

    How to create & consume webservice for website


    I am working on using c# website project.Now company wants to use webservice for insert,update,delete and select datas.I have created folder called Webservices in root.I want to add Webservice to this folder.After writing the code,i will use in code behind file to insert the records.I want the entire steps for the webservice create and consumption for my assigned project.

  • #763652
    Hi Rama,

    Have you refer below link "", this will help you to create and consume your web service, try it out this will help you to move further in your project.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #763653
    Hi Rama.

    Select new empty wesite and name as yourService the right click on website path and select add new item.
    Secelct webservice from list and name as sampleService, clik ok.
    Visual studio creates sampleservice.asmx and sampleservice.cs files.
    Write methods in class file, the methods like insert, update and delete
    Write the necessary code to perform the insert,update and delete operations build the project thus your service is is ready to be consumed.
    Now you should have a client application to consume the service created by you.
    In order to call the service methods you should create a proxy class then call the methods of service with the object.

    Refer the below article which shows you clearly step by step to create and consume the webservice.

    You can post your doubts if you have any, after reading that article.

    Sridhar Thota.
    Editor: DNS Forum.

  • #763655
    I want to add webservice files to my created folders i.e
    WebServices.Is the Add serviceReference is mandatory?

  • #763656
    Hi Rama,

    If you want to consume your Webservice in your project that is mandatory to add ServiceReference, without that you can't access your webservice into your project.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #763692
    To create or use web service for website, you need to follow three steps;

    • With all employee details method, create ASP.Net web service
    • With the help of database, Web service method will get employee details
    • Make web application to access and bind the response details to the grid

  • #766508
    Nice discussion. Sorry to say that I have no idea, but after reading this discussion, I know How to create & consume webservices for website. Actually I am a web hosting user and I hosted my website on,which provides free as well as paid hosting services. Continue discussion so that those who have no idea can get something. Thanks a lot.

  • #766574
    web service is an application that connects to other web based application through HTTP, WebService is language independent and Web Services communicate by using standard web protocols and data formats it communicates with HTTP, XML, SOAP
    Web Service messages are formatted as XML, a standard way for communication between two incompatible system. And this message is sent via HTTP, so that they can reach to any machine on the internet without being blocked by firewall.
    you need to write a web method in class file and run its ASMX file
    then you need to create a web site and its reference using add 'web reference'
    see below link for more details

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #766578
    Just install/create web app for you web service in the IIS.
    What kind of web service you are using, SOAP or REST?.

    If it is the SOAP you have to refer that web service in your application. Once you refer the web service you will get the proxy classes for your web service. So you can access all the methods available in that web service. This is the way to consume the SOAP web service in your application.

    If it is the REST kind of web service it is very simple to consume. Just make HTTP call and consume the web service. You can to create the HTTPClient, specify the URL send the input string.

    By Nathan
    Direction is important than speed

  • #766625

    Kindly Go through the below mentioned Links for your Reference. It may helps you lot.




  • Sign In to post your comments