Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 915
  • Last Modified:

Remote stop and start of specific IIS web application (Windows 2003)

Hi.

Is it possible to remote stop and start a specific IIS web application under Windows Server 2003 R2 SP2?

Our scenario is the following: We have multiple IIS web servers and a dedicated ms sql database server, all running on Windows Server 2003 R2 SP2. Each web server has two web application. An ecommerce application and a standby application that is started when there is maintenance work in progress. On maintenance the ecommerce application is stopped. This is all done manually.

Now I want to know If I can run a script on the database server that stops each ecommerce web application on the web servers and start the standby application. Then I will shutdown sql server automatically, do some maintenance work, restart sql server and remotly restart the ecommerc applications (stopping standby application before).

Is this possible? Can I write a batch or sth. that does the work?

I only know that I can completly stop and start IIS remotly with iisreset.exe. But that will shutdown all applications.

0
Sven
Asked:
Sven
  • 3
  • 3
1 Solution
 
Sander StadSysteemontwikkelaar, Database AdministratorCommented:
Are the different applications placed in different application pool or are they in the same application pools and separated bij virtual directories?
0
 
Sander StadSysteemontwikkelaar, Database AdministratorCommented:
In case the the applications are in different websites you can use the "iisweb /?" in the command prompt to know how to stop en start a website.

You could get the error that you haveto register CScript, just click yes and you'll be able to use the command tool.
0
 
SvenTech Lead Web-DevelopmentAuthor Commented:
Same application pool for ecommerce and standby but each is a different application, not only seperated in virtual directories of same application. Only one of those both can run at a time (same ip and ports).
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
SvenTech Lead Web-DevelopmentAuthor Commented:
Yes, I can do sth like "iisweb /s MYWEBHOST /stop" but this will stop the whole IIS websites.
0
 
Sander StadSysteemontwikkelaar, Database AdministratorCommented:
You forgot to add the website's name. You can use this example to stop a website:
iisweb /stop [websitename] /s [servername] /u [username] /p [password]
You can use the same command line but replace the "stop" with "start"

0
 
SvenTech Lead Web-DevelopmentAuthor Commented:
Ahh! That is the trick. Thank you very much.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now