[Mono-devel-list] xsp webservice initialization on startup

chicago5 at gmx.de chicago5 at gmx.de
Sat Nov 6 18:00:56 EST 2004

i can't post from my other email account. there is one email from me to be
moderated (because i sent an 81kb log file) and now i can't post any email
to the list at all through my other email account. 

anyway, here is what i originally wanted to say + ask (many thanks in

please ignore my unknowledge in this field, but is there a way to initialize
my webservice (written in an .asmx file) upon xsp startup?

My books i have available don't tell me if it's possible or not and the web
is not very clean on this topic.

my constructor is called once, but only as soon as a client accesses the
service - i need to start some other stuff ...

am i doing things right or should i use another approach (i.e. an exe with
implements web service methods)? what do i need to add to call something as
soon as the server starts?

many thanks in advance!
Mono is an outstanding package - especially in conjunction with soap+java!
best regards,

------- code

<%@ WebService Language="c#" Codebehind="ServerGate.asmx.cs"
Class="ServerGate" %>
using System;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web;
[WebServiceAttribute (Description="Gate to the ccapi.net server. Provides
various functions for access to the soap service.")]
public class ServerGate : System.Web.Services.WebService
   static ServerGate ()
   {         // is called once.
   public bool IsReusable(){
       return true;
   [WebMethod (Description="Sample function")]
   public string sampleCall (string a)
       return "test"+a;

----- snip end.

More information about the Mono-devel-list mailing list