Tuesday, May 09, 2006

Windows XP - having multiple web sites under IIS

Long time ago I found a post which described how to set up multiple web sites in WinXP's IIS (which is not supported by default). Unfortunately I can't find it anymore and I didn't save the link either - since I found it very usefull, I'm posting it here (for my future reference mostly :) - once again, it's just a copy of someone else's post...


In the server versions of Windows, you can have multiple versions of web sites installed into IIS and running simultaneously. You can install and run more than one web site within IIS in the professional version of Windows XP or Windows 2000. You just have to pull a trick to modify the IIS metabase to that it is aware of the additional sites.. The user interface does not support creating more than one web site. Also, you still will not be able to have more than one site running at the same time.

To create the second web site:

Create a command prompt window.
Type "cd \Inetpub\Adminscripts" and press enter.
Find out what the highest numbered site you currently have is. You can do that by typing adsutil.vbs ENUM /P W3SVC

If you have never done this process before, the highest numbered site should be 1.
Add one to the highest numbered site. Then run this command:
adsutil.vbs COPY W3SVC/1 W3SVC/x

Where x is replaced by the new numbered site. For example if you run the enum command and the highest numbered site is 4, then type this:
adsutil.vbs COPY W3SVC/1 W3SVC/5

Run the IIS Manager. You should find a new site has been created. It will be an exact copy of site #1, so you will need to change a few things. Go into the properties for the web site. Change the site name, and the virtual directory for the root of the web site to point to another location on the hard disk. Usually, you will create a new subdirectory under Inetpub and point the virtual directory at that.
To use the site, you must first stop the currently running site, then start the new site.
To delete a site, first stop it if it is running (bad things happen if you don't!). Then type:

adsutil.vbs DELETE W3SVC/x

Where x is the number of the site you want to delete.

Windows XP - enable SMTP for IIS

I've had problems with my IIS on WinXP machine - emails wouldn't get sent. The CDO.Message would get created, but then during Send(), I'd get an error.
The trick is to set Relay - open IIS manager, go to properties of the virtual SMTP server, select the "Access" tab and there at the bottom is a "Relay..." button. Click it, the click "Add..." and type in 127.0.0.1 IP. That's it :)

Crystal XI and SMTP

I was working on setting up the SMTP part of Crystal XI (Business Objects).

1) First error I had was "destination DLL disabled. CrystalEnterprise.Smtp" - to fix that you need to go to the CMC (central management console), click "Servers", click "reportjobserver", select "Destinations" tab and there on the list enable the "Email (SMTP)" (check it and click the "enable" button).

2) Next 2 errors were "server error. CrystalEnterprise.Smtp: SMTP_E_TCPSOCKET_OPEN(2)" and "server error. CrystalEnterprise.Smtp: SMTP_E_COMMAND_NOT_IMPL(502)". Both are related to the SMTP configuration. To fix this, click on the "Email (SMTP)" and set the Domain/Server/Port. You may need to specify login as well - depends on yout network configuration.

Everything should be ok then - to test it, create a schedule for report and check the result.

Here are some useful links I found during my investigation.

1/ How to test SMTP:
http://seer.support.veritas.com/docs/252098.htm

2/ SMTP issue with McAfee
view...

3/ KB for Crystal
http://support.businessobjects.com/library/kbase/articles/c2018649.asp