简体   繁体   中英

restarting IIS (7.5) from a web page

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)?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM