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 thi开发者_StackOverflows .
Any ideas ?
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.
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.
精彩评论