Results 1 to 3 of 3

Thread: Web Service in ASP.NET

  1. #1
    Join Date
    Dec 2008
    Posts
    12

    Web Service in ASP.NET

    Hi,

    I am planning to use the concept of web services in my asp.net project.
    but i don't have any idea about web services.
    so will you please help me for this.

    Thanks.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Web Service in ASP.NET

    Web Service

    Web Service is a software component for application to application communication. Web services use XML based communicating protocols.

    In Microsoft .Net there are some advanced concepts of enterprises services available, like Web Services and .Net Remoting.

    ASP.NET Web services and .NET remoting are two separate paradigms for building distributed applications using Internet-friendly protocols and the .NET framework.

    Web services typically use SOAP for the message format and require that you use IIS for the HTTP message transport. This makes Web services good for communication over the Internet, and for communication between non-Windows systems. Web services are a good choice for message-oriented services that must support a wide range of client platforms and a potentially heavy load.

    Remoting can be configured to use either SOAP or Microsoft's proprietary binary protocol for communication. The binary protocol yields higher performance, and is great for .NET to .NET communication, but cannot be used to communicate with non-Windows platforms. Remoting does not require an IIS Web server, making it a good choice for peer-to-peer development, but this also means that it cannot leverage the scalability and performance of IIS to support a high number of connections or requests per second.

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: Web Service in ASP.NET

    You can use this code.

    using System;
    using System.Web;
    using System.Web.Services;
    using System.Web.Services.Protocols;

    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class Service : System.Web.Services.WebService
    {
    public Service ()
    {
    }

    [WebMethod]
    public string HelloWorld() {
    return "Hello World";
    }
    [WebMethod]
    public int add(int a, int b)
    {
    return a + b;
    }

    }


    Here the HelloWorld function is default function when we create the web service project.

    The add function which is have two parameters (a & b) and return an integer value.
    Here we should have to give the parameter when clicking the add function.

    After you will get the xml file.

Similar Threads

  1. Replies: 5
    Last Post: 04-02-2012, 04:08 PM
  2. Replies: 2
    Last Post: 17-01-2012, 11:52 PM
  3. Replies: 10
    Last Post: 30-08-2010, 07:46 PM
  4. User Profile Service: Service Failed Logon error in vista
    By Venator in forum Operating Systems
    Replies: 2
    Last Post: 19-02-2009, 10:37 PM
  5. Replies: 1
    Last Post: 28-08-2008, 04:33 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,583,658.84576 seconds with 16 queries