IIS7 - How to Save Configurations to a File for Applications, Application Pools and Virtual Directories
Posted on 2011-03-18
My company just started using Windows 2008 R2 and IIS 7. Previously we were using Windows 2003 and IIS 6. We have a number of applications that use IIS application pools, virtual directories and applications (applications only in IIS 7).
With IIS 6, it was very simple to replicate a pre-configured Application Pool or Virtual Directory. All we had to do was select the Application Pool or Virtual Directory, right click it, choose All Tasks, and select Save Configuration to a File. Then we could create a replica of the Application Pool or Virtual Directory by choosing "New Application Pool from File" or "New Virtual Direcotry from File". This was very convenient, and it allowed us to 1) save configurations before we made any changes - in case we needed to restore them, and 2) create new Application Pools and Virtual Directories from previously saved configruation files.
With IIS 7, we cannot find the Save Configuration to a File feature in the IIS Manager's interface. We've done some research, and it appears that Microsoft removed this functionality from the GUI in IIS7. It seems they've replaced it with a command line tool called appcmd. We can't find good documentation on the appcmd command line utility, so we're a bit reluctant to use it without a better understanding.
So, here is what we need to do:
- Save a specific Application Pool's configuration to a file. Then, create a new Application Pool using the saved configuration file's information, parameters, etc. And, of course, the new Application Pool would need to have a different name.
- Save a specific Virtual Directory's configuration to a file. Then, create a new Virtual Directory using the saved configuration file's information, parameters, etc. We realize we would still need to change some of the configuration information after the new Virtual Directory was created from the saved configuration file.
- Save a specific IIS "Application's" configuration to a file. Then, create a new IIS Application using the saved configuration file's information, parameters, etc. Again, we realize some of the configuration information would have to be changed after the new IIS Application was created.
We're not looking to transfer anything from one IIS server to another. We're working with the same IIS server, and we want to replicate Application Pools, Virtual Directories, and IIS Applications.
In our case, a vendor's installation originally created the original Application Pools, Virtual Directories, and IIS Applications. We're a partner with the vendor and we host their applications in several data centers throughout the U.S. The vendor originally create their applications for single company on premise deployments. And, they've asked us to transform their applications into mult-tenancy applications. This was easy to do in IIS 6, but we're not quite sure how to handle it in IIS7.
So, to summarize, we need to learn how to save configurations for IIS Applications, Application Pools and Virtual Directories using IIS7. And, we need to learn how to create new applications, pools and virtual directories from those saved configuration files. And, all of this needs to be done on the same IIS 7 server. I'm over simplifying our configuration here, but if we can establish how to do the above on one IIS server, we can perform the same operations on our other IIS servers.
And, of course, everything needs to be done yesterday and there is no time for us to be re-trained on IIS 7. So, I'm hoping someone can provide me with the procedures or the command line syntax for saving configuration files for specific IIS applications, pools and virtual directories. And, I'm hoping someone can educate us on how to create new IIS applications, pools and virtual directories from the saved configuration files.
If we have to use the appcmd command line utility, we will. But we'd love it if someone could give us the precise syntax for performing the above for specific IIS applications, pools and virtual directories.
Sorry for the long-winded question. And, thank you very much in advance for your help.