Is there a way to restart your IIS Programmitcally??

F

firas489

Sometimes i need to restart the IIS on a current server, but the
problems is that if i want to, then i have to contact them by either
email or phone, but sometimes it takes few hour to do it. So i wonder
if there Is a way to restart your IIS Programmitcally??


Thanx in adavnce

Best Regards
Firas S Assaad
 
K

Kyle Peterson

unless its your own server or your own dedicated server probably not without
asking

if it is your own server you remote access in and do an iisreset or you
could probably set something up in a different way

problem is stopping IIS effects every site on the server and under shared
hosting that is an issue
 
B

Bob Barrows [MVP]

Sometimes i need to restart the IIS on a current server, but the
problems is that if i want to, then i have to contact them by either
email or phone, but sometimes it takes few hour to do it. So i wonder
if there Is a way to restart your IIS Programmitcally??
If you have permissions, you can issue a Net Stop command via a Shell
object. The problem is, the ASP user rarely will have the permissions
required to execute this command. so, te answer to your question is: yes
and no.
 
S

Slim

I had the same problem once
what I did is use scheduled tasks to run a script ever 15 minutes

the script would check a text file for the word reboot, if it found it, it
rested IIS

I also set a ASP page to writ to the text file

so all I had to do is go to my asp page and write "reboot" to the text file
and then the next time the script ran it restarted IIS
 
B

Bob Barrows [MVP]

This again requires you to have some control over the server ...

My question is: if IIS is locked up so it needs to be rebooted, how will an
asp page run to trigger the reboot?
 
K

Kyle Peterson

I guess that when he remote access's in or runs netstop.. :)

Still a clever idea.. maybe not the best.. but clever
 
D

Dave Anderson

Bob said:
This again requires you to have some control over the server ...

True, but an arrangement might be made to give you your own Application Pool
under your control if the server is IIS 6. Wouldn't it then be possible to
cycle the Application Pool without disturbing others?



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
S

Slim

Bob Barrows said:
This again requires you to have some control over the server ...

My question is: if IIS is locked up so it needs to be rebooted, how will
an
asp page run to trigger the reboot?


good quesion,

My problem was that i nereded to reboot the server not IIS, of cause thios
would not work in this case but a simular thing could work,

like access a page on the IIS server with xmlhttp.open for example, if it
fails reboot
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top