Export / Import IIS Web Site Settings 
I am not exactly a MS/IIS person. The content of this post is not based on any kind of deep experience. I just had to figure out something when I needed to export/import the IIS configuration... Feel free to leave comments if you disagree with anything bellow.

Export:

C:\WINDOWS\system32>cscript iiscnfg.vbs /export /f ../../IISExport.xml /sp /LM/W3SVC/1 /inherited /children
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Connecting to server ...Done.
Configuration exported from /LM/W3SVC/1 to file ../../IISExport.xml.


Parameters:
.......................
/f [Path\]FileName.xml

/sp SourcePath - Required parameter. Specifies the metabase keys to export. Enter a metabase path, including /lm/ root, to indicate the selected keys.

Format: /LM/W3SVC/n, where n - is instance ID in the IIS metabase.
To find out what is the instance ID of the site you are exporting go to the IIS Manager and click on Web Sites in the left menu. It will show the list of sites and IDs on the right.

Alternatively, you can go to IIS manager and right click on the Web Sites, then select properties.
On the Web Site Tab click properties in the logging section. At the bottom it shows you the log file name. It starts with W3SVCn where n is the instance ID.

/inherited - Adds the inherited properties of the exported keys to the export file. Without this parameter, the export file does not include properties inherited from higher-level keys. If you select this option, iiscnfg.vbs adds the inherited properties of the exported keys to an IIsInheritedProperties key in the export file. When you import keys from this file, you can elect to import the inherited properties with the keys.
Note: When inherited properties are imported, the imported keys retain the properties they inherited in the exporting configuration. If inherited properties are not imported, the keys inherit the properties of the importing configuration.

/children - Recursively adds the subkeys of the specified key to the export file.


Import:

C:\WINDOWS\system32>cscript iiscnfg.vbs /import /f ../../IISExport.xml /sp /LM/W3SVC/1 /dp /LM/W3SVC/111 /inherited /children /merge
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Connecting to server ...Done.
Configuration imported from /LM/W3SVC/1 in file
IISExport.xml to /LM/W3SVC/111 in the Metabase.


Parameters:
.......................

/f [Path\]FileName.xml - Required. Specifies the path and file name of the XML source file.

/sp SourcePath - Required. Specifies the location in the XML file of the keys being imported. Enter the metabase path as it appears in the XML file. To import all of the keys in the source file, enter the metabase path of the root key.

/dp DestinationPath Required. Specifies the metabase path into which the keys are placed. Enter the metabase path as it appears in the XML file.

In the example: /LM/W3SVC/111, where 111 is just a unique key previously not present in the metabase of the target server.

/inherited - Imports the inherited properties of the keys. This parameter is only effective when the source file includes inherited properties.

/children - Recursively imports the subkeys of the specified key.

/merge - Combines keys in the XML file with the existing metabase keys. Without this parameter, the keys in the XML file replace existing keys in the same metabase path. The /merge parameter adds keys to the metabase that appear only in the XML file, retains keys in the metabase that are not in the XML file, and applies the values in the XML file when a key appears in both the XML file and the metabase.




Here is a good article about IIS Metabase structure.

  |  [ 0 trackbacks ]   |  permalink  |  related link
Server object error 'ASP 0177 : 800401f3' - Solution 
It is another generic problem with a simple solution.

The error appears as the following:

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/index.asp, line 1284
800401f3

You need to register your COM Wrapper DLL(s) with The Assembly Registration tool.

C:\Inetpub\wwwroot\bin>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm /codebase MyDll.dll
Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.42
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.
RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it. Types registered successfully


Ignore the warning message.



  |  [ 0 trackbacks ]   |  permalink  |  related link
404 Error in IIS 6 when loading .aspx pages 
It is an old and common problem.

Here is a quick recap on how to solve it:

1. Make sure .NET is installed on your machine

2. If IIS was installed before .Net run 'aspnet_regiis -i' from your Microsoft.NET\Framework\vXXX directory

3. In "Internet Information Services Manager" on your server you should have "Web Sites" folder as well as a "Web Service Extensions" folder. In that folder there are some services listed there and you should have "ASP.NET v<version>" listed. The service should be set to "Allow".

Uncheck the "Show friendly HTTP error messages" in Internet Explorer settings (Tools - Internet Options ... - Advanced )


  |  [ 0 trackbacks ]   |  permalink  |  related link
Robo Skater, where is my Christmas wish list? 
The Latest Red Herring magazine mentioned this new robotic toy from Japan called Robo Skater.



As most of the geeky nation I love toys like that and as a part of daily dose of procrastination decided to google around for more info.

Check out the Gallery section on the site of its maker: www.plen.jp . I find it pretty impressive.

Here is another video I found on YouTube:

http://www.youtube.com/watch?v=HBIW7As0nxM

There is only one reason with the Christmas wish list. The magazine claims that the prise tag is more than 2k… ouch... I guess I will just write it down under my "Red Car Collection" ;)

As usual, looking for one thing in the Internet you find many others.

If you don't get impressed easily by a skating robot toy, maybe you will like this one:

http://www.youtube.com/watch?v=H7asESFbzhA



  |  [ 0 trackbacks ]   |  permalink  |  related link
DMV Test Questions... Huh? 
It may seem as a strange topic for my technology related blog. However, the reason for posting it is exclusively experimental. The subject of the experiment is Google ads, traffic, and is it easy to make a few bucks by using ads on your site. I will write about results, of course.

Here we go, just follow the link bellow:

California DMV written test sample questions






  |  [ 0 trackbacks ]   |  permalink  |  related link

Back Next