473,698 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there a way to restart your IIS Programmitcally ??

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

Jan 5 '06 #1
8 3039
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
<fi******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
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

Jan 5 '06 #2
Thanx Kyle for the reply
That was helpful

Jan 5 '06 #3
fi******@gmail. com wrote:
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.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jan 5 '06 #4
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


<fi******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
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

Jan 5 '06 #5
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?
Slim wrote:
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


<fi******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
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


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jan 5 '06 #6
I guess that when he remote access's in or runs netstop.. :)

Still a clever idea.. maybe not the best.. but clever
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:up******** ******@TK2MSFTN GP11.phx.gbl...
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?
Slim wrote:
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


<fi******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
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


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Jan 5 '06 #7
Bob Barrows [MVP] wrote:
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.
Jan 6 '06 #8

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:up******** ******@TK2MSFTN GP11.phx.gbl...
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
Slim wrote:
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


<fi******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
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


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Jan 6 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2231
by: Piotr Trawiński | last post by:
I have this notorious problem: at some point pgsql simply hangs up and requires a restart. --------------------------------------------------------------------------- ------- homer:/usr/share/doc/postgresql-contrib# /etc/init.d/postgresql restart Restarting PostgreSQL database: postmaster Stopped /usr/lib/postgresql/bin/postmaster (pid 14243 14245 14247 14750 14811 1489 15569 15570 15573 15584 15643 15644 15665 15800 15801 15804 15817...
18
5369
by: amdishigh | last post by:
We are experiencing the following problems concerning ASP.NET: our ASP.NET application, written in .NET 1.1 platform, and hosted in IIS 5.0 environment, experience frequent session timeout problem. After tracing, we find that it should be caused by "ASP.NET Application Restart" (proved by incremented counter for "Application Restarts" of "ASP.NET 1.1.4322" in "Performance" whenever the timeout happens). From MSDN documentation, we find...
3
3366
by: Pint | last post by:
I would like to know if there is a programatic way to force the Application object to restart. I have a hosted website where I will be unable to control the webserver (eg:iisreset), and I would like to be able to trap certain events and cause the entire application to reload. Thanks in advance. -Pint
3
3207
by: John A Grandy | last post by:
In ASP.NET 1.1 and/or 2.0 ..... Is it possible to configure a web-app so that replacement of an .xml file ( physically located under the virtual dir root ) with a newer version of the file causes a web-app restart ... ? Also, is a stopping and starting a website in IIS the only way to restart a web-app ? (Of course, iisreset stops and starts all web-apps on the web-server ... but
6
3802
by: Leonardo Curros | last post by:
Hello, I would like to know what's the best way to restart one service. I would like to do it from the service itself. Is this possible? I try it with ServiceController.stop() ServiceController.WaitForStatus(ServiceControllerStatus.Stopped) ServiceController.start() but doesn´t works. It seems waitforstatus instruction is the last
8
9316
by: kenneth fleckenstein nielsen | last post by:
hi guru's I want to restart my webservice when ever it throws an exception that isn't cought. can i do that by web.config or iss or how ??
4
7285
by: shorti | last post by:
Can anyone explain in greater (and more comprehensive) detail what the RESTART option does in the ALTER TABLE table ALTER COLUMN statement. This is the description in Info Center: RESTART or RESTART WITH numeric-constant Resets the state of the sequence associated with the identity column. If WITH numeric-constant is not specified, the sequence for the identity column is restarted at the value that was specified, either implicitly or...
3
3317
by: MarkusJNZ | last post by:
Hi, I have two different applications running on 2003 both in two different vitrual directories. One application runs on the .NET framework 1.1 whilst the other runs on 2.0. If I change the framework version (via IIS admin ASP.NET tab) for either application (Initally the 2.0 app was recognised by IIS as 1.1) does this force IIS to restart? ?? Any links to further reading would be good.
1
2637
by: Brian Simmons | last post by:
Hi All, I know that if you modify the web.config file or any file in the App_Code subfolder, that ASP.net 2.0 will "restart" the application (i.e. clear out any sessions, etc...). Are there any other changes that restart the application? Will modify a code-behind .cs/.vb which calls a class in the App_Code folder restart the application?
0
8610
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4623
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.