Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-10-09
6
Medium Priority
?
908 Views
Last Modified: 2013-11-05
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
Comment
Question by:Sven
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 9

Expert Comment

by:Sander Stad
ID: 22676496
Are the different applications placed in different application pool or are they in the same application pools and separated bij virtual directories?
0
 
LVL 9

Expert Comment

by:Sander Stad
ID: 22676513
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
 
LVL 11

Author Comment

by:Sven
ID: 22676515
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Author Comment

by:Sven
ID: 22676546
Yes, I can do sth like "iisweb /s MYWEBHOST /stop" but this will stop the whole IIS websites.
0
 
LVL 9

Accepted Solution

by:
Sander Stad earned 2000 total points
ID: 22676800
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
 
LVL 11

Author Closing Comment

by:Sven
ID: 31504567
Ahh! That is the trick. Thank you very much.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question