Night Walker
Night Walker

Reputation: 21280

entry point at web service

I have some web service , I have there asmx file with the web service's functions.

Now I need also to open there an worker thread but I don't see there any entry point like main or something like this .

Any ideas ?

Upvotes: 2

Views: 3228

Answers (2)

Shanadas
Shanadas

Reputation: 535

Are you looking for application start event in global.asax ? AFAIK,This event fires on the very first request to your web service after a server restart.

Upvotes: 2

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364349

Web service doesn't have any main. Web service is hosted in web server and it is instantiated when a client send a request to call one of its web methods - each request is processed in separate thread out of the box. I also don't think that custom worker thread in the environment where you don't have full control over application domain recycling (unless you turn everything off in IIS) is a good idea.

Upvotes: 2

Related Questions