[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

How/where/when to initial static variables in dll component in web service

(James Shen)

12/26/2002 3:32:00 AM

Hi,

I am new to .dot but trying to build a complext financial system. Here
is what I am trying to do. I write my business login in C# and build
it as a DLL. Then using the web servies to wrap around it so the
clients can access function in it. In the DLL, I have many static
variables look like this

public class X {
private X()
{
}

public static X x = new X();
}

This is built into a DLL.

When I used this DLL in a web service, X looks like uninitialized.

Question?

1. When X will be initialized?
2. When the DLL is loaded
3. Would it be unloaded when a service call finishes since web service
calls are stateless?
4. If there are mutiple Web servies use this DLL, can I assume there
is only one X.x.

Thanks
James