Click here to Skip to main content
15,878,748 members
Articles / Programming Languages / C#

Using the Web Services and COM+ Event System in the .Net Application.

Rate me:
Please Sign up or sign in to vote.
4.86/5 (7 votes)
11 Oct 2001CPOL7 min read 122.9K   1K   44  
This article describes how to subscribe the Web Service into the COM+ Event System using the C# language.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Threading;

namespace WebServiceLogMsg
{
	/// <summary>
	/// Summary description for Service1.
	/// </summary>
	public class Service : System.Web.Services.WebService
	{
		public Service()
		{
			//CODEGEN: This call is required by the ASP.NET Web Services Designer
			InitializeComponent();
		}

		#region Component Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
		}
		#endregion

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
		}
		[WebMethod]
		public void WriteLogMsg(string ticket, string msg)
		{
			// to do:
			Trace.WriteLine(string.Format("[{0}] WebServiceLogMsg.WriteLogMsg({1}, {2})", this.GetHashCode(), ticket, msg));
		}
		
	}
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions