//--------------------------------------------------------------------------- // Copyright © 2009-2009 Eamonn Duffy. All Rights Reserved. //--------------------------------------------------------------------------- // // $RCSfile: $ // // $Revision: $ // // Created: Eamonn A. Duffy, Oct/Nov-2009. // // Purpose: Example 001 Web Service with a Pseudo-Ping method. // //--------------------------------------------------------------------------- using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Web; using System.Web.Services; using EamonnDuffy; namespace ZEamonn.WebServices { /// /// Summary description for Example001 /// [WebService(Description = "Example001 Web Service - PseudoPing.", Namespace = "http://www.ZEamonn.info/WebServices/Example001/")] [System.ComponentModel.ToolboxItem(false)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class Example001 : System.Web.Services.WebService { public Example001() { //CODEGEN: This call is required by the ASP.NET Web Services Designer InitializeComponent(); } #region Component Designer generated code //Required by the Web Services Designer private IContainer components = null; /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if(disposing && components != null) { components.Dispose(); } base.Dispose(disposing); } #endregion [WebMethod] public void PseudoPing(out string ConsumerAddress, out string HttpUserAgent, out string ProviderAddress) { ConsumerAddress = Utility.GetRemoteAddress(Context.Request); HttpUserAgent = Utility.GetUserAgent(Context.Request); ProviderAddress = Utility.GetLocalAddress(Context.Request); } } } //--------------------------------------------------------------------------- // End Of $RCSfile: $ //---------------------------------------------------------------------------