ASP.Net/Network/Web Service
Create a Web Service with C#
<A href="http://www.nfex.ru/Code/ASPDownload/WebServiceCallCS.zip">WebServiceCallCS.zip( 4 k)</a>
1. <A href="/Code/ASP/Network/SimpleWebService.htm">Simple Web Service</a> 2. <A href="/Code/ASP/Network/CreateaWebServicewithVB.htm">Create a Web Service with VB</a> <A href="/Code/ASP/Network/CreateaWebServicewithVB.htm"></a>
Create a Web Service with VB
<A href="http://www.nfex.ru/Code/ASPDownload/WebServiceCallVB.zip">WebServiceCallVB.zip( 4 k)</a>
1. <A href="/Code/ASP/Network/SimpleWebService.htm">Simple Web Service</a> 2. <A href="/Code/ASP/Network/CreateaWebServicewithC.htm">Create a Web Service with C#</a> <A href="/Code/ASP/Network/CreateaWebServicewithC.htm"></a>
Simple Web Service
<%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="Service" %>
File: ~/App_Code/Service.cs
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. The time is " + DateTime.Now.ToLongTimeString();
}
}