Click here to Skip to main content
15,917,481 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to call a method or execute code on server restart in asp.net using c#
Posted

1 solution

Is it that IIS restart or OS restart are you talking about?
For both you need to have a service and schedule it only on server or IIS restarts.
 
Share this answer
 
Comments
naren programmers 23-Aug-12 7:02am    
i talking about if i upload something use ftp or server restart due to maintenance
then i want to fire some code and that should happen automatically.
pramod.hegde 23-Aug-12 7:08am    
You need Windows Service and a scheduler. Install this service and schedule it when it has to run. Write your code in the service.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900