This is purely academic curiosity. Is there a way for me to set up a web page, so that surfing to that page will cause IIS to restart (maybe to execute iisreset)?
Asked
Active
Viewed 227 times
1 Answers
-1
Technically, it can be done. :-) I am not giving any pointers here. It is just about calling a process with enough privileges. If you have the privileges on the server, you can do it.
You can in fact crash a worker process quite easily too. Server.Transfer("~/default.aspx", true). [Assuming you are writing this code in page_load of default.aspx.
However, please do not try this on production server.

Rahul Soni
- 4,941
- 3
- 35
- 58
-
If you have pointers why not give them? :-) You can assume the server is mine and that I have full control over it (I'm not trying to hack or damage anyone) – Ami Malimovka Jul 08 '13 at 09:20
-
Well, it is quite simple... and there are plenty of ways in which you can do it. PowerShell, Writing a batch file and calling it will do. http://stackoverflow.com/questions/5884939/running-a-batch-file-from-an-asp-net-page. – Rahul Soni Jul 08 '13 at 10:39