|
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
/// <summary>
/// Summary description for ServerTimeService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class ServerTimeService : System.Web.Services.WebService {
public ServerTimeService () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string GetServerTime() {
return "Server Current Time Returned by Web Service is : " + DateTime.Now.ToLongTimeString();
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have more than 9 years of experience in various Microsoft Technologies. I spend most of my working time in C#, ASP.NET, WCF, WPF, WF and LINQ.
Check My Profile