views:

75

answers:

1

hi all. how I Can Configure IIS to start a method (I define it) before starting each asp.net's application on it?

i just want to do someting with IIS (not each application) so that any application that starts on Server executes a method that i Defined it. in fact i want to create a threat that do something. for example i can create this threat in a asp.net application but when IIS shuts down this threat too will shut down. now i want sure at any time this threat is running (one or more instances of this threat). and IIS version is 6.

+1  A: 

You can use the Global.asax file and put your code in the Application_Start() method of each ASP.Net application, which will run it once when the first request comes in to the application.

I'm not entirely clear if this answers your question. Can you be a bit more specific on what you're trying to do?

womp
i just want to do someting with IIS (not each application) so that any application that starts on Server executes a method that i Defined it.in fact i want to create a threat that do something.for example i can create this threat in a asp.net application but when IIS shuts down this threat too will shut down.now i want sure at any time this threat is running (one or more instances of this threat).and IIS version is 6.
What is the actual nature of what you're trying to do in your method?
Nathan Taylor
read some email message and acroding to this messages content do something...