Automatic IIS reset when we have a 503 error

7.7k views Asked by At

My website written with asp.net gives 503 error several times a week for unknown reasons and my website users suddenly encounter this error, we are investigating the reasons, but before that we are looking for a solution to The dedicated IIS section can be restarted automatically, is there a solution in this regard? The goal is to do this reset automatically before users want to let us know that the website has encountered an error

Thanks a lot

1

There are 1 answers

0
Bruce Zhang On

The 503 error is probably a problem with the app pool, the app pool suddenly stops or the process is killed. If you can be sure there is no problem with the app pool, you can just restart the application pool without restarting IIS.

If you want to restart IIS, you can use Task scheduler.

  1. Open task scheduler in Control panel, create basic task wizard in right-hand action. Enter a name and next. enter image description here
  2. Choose the trigger and next. enter image description here
  3. Choose start a program and next. enter image description here
  4. Choose iisreset.exe and next. enter image description here
  5. Finish.