Technical: Microsoft – Internet Information Server (IIS) – MS Windows 2003 / v 6.0 – Copying Virtual Directories between Servers
My silly journey with trying to trying to keep decade old machines running is well chronicled. But, last weekend with nudging from my parents, telling me that Sunday was the last day to take advantage of an E-Waste effort in our community, finally took some of the older machines in.
One of the machines kicked the bucket a few months ago and I never knowing which way to turn a screen driver asked a good and tireless friend, Abraham, to please me out.
Abraham did all the fearful stuff – Giving away credit card information to Ebay / Google Plus hawkers, listening meaningfully to computer beep sounds and correlating them to specific diagnostic codes.
Anyways, computer is back up and running well.
Now it is time to get Software loaded and configured.
Re-installed Microsoft Windows Server – v2003 in this case. Added Microsoft SQL Server 2008/R2.
Never one to let a Saturday morning go to waste without a bit of personal computer rumble, I decided I needed to use the same server as a backup web server. The actual web server is hosting a couple of homemade Microsoft IIS ASP.Net Web sites.
So the question is how do I make a copy of the configuration data from the working web site to this one.
Launch IIS MMC
As indicated by our title, as the servers are running MS Windows 2003, we are on IIS v6 .
Connect to both IIS Nodes
Here are the steps to connect to both your source and destination IIS Nodes
- Select the top node that read (Internet Information Sevices [IIS])
- Right click on your selection and from the drop-down menu, select the “Connect..” menu item
- The “Connect to Computer” window will appear
- Enter the computer name and if you need to connect as a different user relative to your current user, please indicate the username & password credentials; else to connect as your logged-in user, please leave the username & password text boxes blank
Backup IIS Virtual Directory Web Site
Once you have a connection to your Source Server, select your Virtual Directory, and back up the configuration file.
- Select the Source Server
- Transverse the left panel – [Web Sites] \ [Default Web Site] \ [ Virtual Directory]
- Right click on your Virtual Directory
- From the drop-down menu, select “All Tasks” \ “Save Configuration to a file”
- The “Save Configuration to a file” window appears
Please keep in mind that notwithstanding where you run this from, the path you specific in the “Save Configuration to a File” window should exist on your actual Source Web Site. And, that the configuration file will be persisted on that Source Web Site.
Restore IIS Virtual Directory Web Site
Once you have a connection to your Destination Server, select the Web Site and create a new web Virtual Directory from the configuration file.
- Select the Destination Server
- Transverse the left panel – [Web Sites] \ [Default Web Site]
- Right click on you web site
- From the drop-down menu, select “New” \ “Virtual directory (from file)”
- The “Import Configuration” window appears
- In the “Import Configuration” window, in the File Text Box enter the full’s file name to your configuration file
- The configurations stored in the file will be listed
- Select the configuration that you will like instituted
Please keep in mind that if you are running the restore across a network folder, you can not indicate a UNC file name. And, as such please copy the file from the network folder unto a drive local to the destination web site.
You will not get an error, but nothing will show up in the Configuration listbox when you click on the “Read File” button.
Copy Application Pools from Source To Destination Hosts
Most of us use “Application Pools” on our web site, please locate and follow the same principles to backup and restore corresponding Application Pools.
Error – We had problems gaining access to your Virtual Directory
The error messages stated that “Service is unavailable“.
Knew to look for corresponding errors in MS Windows Error Log. The relevant errors states:
- Source :- W3SVC
Event ID :- 1021
The identity of application pool <Application Pool> is invalid. If it remains invalid when the first request for the application pool is processed, the application pool will be disabled. The data field contains the error numberData 69 05 07 80
- Source :- W3SVC
Event ID: 1057
The identity of application pool <Application Pool> is invalid, so the World Wide Web Publishing Service can not create a worker process to serve the application pool. Therefore, the application pool has been disabled.
- Source: W3SVC
Event ID: 1059
A failure was encountered while launching he process service application pool <Application Pool>. The application pool has been disabled.
For error messages that have their Data filed populated, you really want to click on the Words radio button. The default view is to show the Bytes data.
Googled for the error message:
application pool 80070569
And, found the most joyous help …
ASP.Net Error : The identity of the Application Pool is invalid
The big take away from that very good Q/A are:
- Add user to the local IIS_WPG Windows Group
- Launch command window, and issue the following command ( Crediting Kev http://stackoverflow.com/users/419/kev )
cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 aspnet_regiis -ga <your_app_pool_user>
Btw, “aspnet_regiis -ga” does the following:
Grants the specified user or group access to the IIS metabase and other directories that are used by ASP.NET. You typically use this option when you are creating a custom service account.
Copy Web Site Application Source Files
Please copy the source files from the Source Host Folders to the destination folder files.
Usually, when in from of my computer, I have a song playing. I am just happy and thankful for YouTube.
Here is an old song, but it keeps it newness and vibrancy, as I listen to it only a few times each year:
Album: Bible Belt
Track : Ariel