Hopefully my earlier response will post shortly; this is absolutely
correct for adding new sites, but does not take into account the fact
that SiteId = "*" does, in fact, trigger a search for the existing site
by description.

Thanks,

Thomas S. Trias
Senior Developer
Artizan Internet Services
http://www.artizan.com/


P.S.  Sorry for not trimming down the previous emails; since my mail
client turns nested replies into a tree with all but the topmost node
collapsed, I tend to forget to trim them down.

-------- Original Message  --------
Subject: Re: [WiX-users] is it a bug that iis:WebSite doesn't locate
presence of existing website using just the Name ->    Description
attribute value versus port settings?
From: Neil Sleightholm <n...@x2systems.com>
To: General discussion for Windows Installer XML toolset.
<wix-users@lists.sourceforge.net>
Date: 4/9/2009 3:56 PM
> That is correct. Although I would add that is it possible (although fairly 
> unlikely) on different machines to get different site ids for the same site 
> name if the "add 1" part of the iis algorithm kicked in. Also, if you deleted 
> "Default Web Site" and recreated it it wouldn't be site id 1 unless you 
> created it as such.
>
> (Don't blame WiX for this, it is the bizarre way iis works.)
>
> Neil
>
> -----Original Message-----
> From: Robert O'Brien [mailto:robert.obr...@microsoft.com] 
> Sent: 09 April 2009 18:26
> To: General discussion for Windows Installer XML toolset.
> Cc: Dmitry Frenkel
> Subject: Re: [WiX-users] is it a bug that iis:WebSite doesn't locate presence 
> of existing website using just the Name -> Description attribute value versus 
> port settings?
>
> So it sounds like you are saying the following would not in fact work because 
> the hashing of the Description attribute value would not come out to 1.
>     <iis:WebSite Id=efaultWebSite" SiteId="*" Description="Default Web Site">
>         <iis:WebAddress Id=ttp" Port="80" />
>     </iis:WebSite>
>
> Therefore the caveat your are trying to clarify is that for sites where you 
> know the siteid was not produced using the iis6 published hash algorithm of 
> the site name in those cases you'd need to be explicit with the SiteId value 
> for the search for the existing web site (not involving use of iis:WebAddress 
> settings) to get you the desired result, e.g. specifically in case of Default 
> Web Site we had better use SiteId=" and not SiteId="*".
>     <iis:WebSite Id=efaultWebSite" SiteId="1" Description="Default Web Site">
>         <iis:WebAddress Id=ttp" Port="80" />
>     </iis:WebSite>
>
>
> -----Original Message-----
> From: Neil Sleightholm [mailto:n...@x2systems.com]
> Sent: Thursday, April 09, 2009 10:13 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] is it a bug that iis:WebSite doesn't locate presence 
> of existing website using just the Name -> Description attribute value versus 
> port settings?
>
> I mentioned this because it may catch you out and SiteId=" would fail. For 
> example, if you created a site that set the site id to a fixed value, 
> something that is perfectly valid to do (adsutil.vbs does this), the hash 
> matching wouldn't would. You have found this I believe when trying to find 
> the "Default Web Site" and find its site id is 1. This also explains why the 
> name is case sensitive, the hash algorithm generates a different site id 
> depending on the case. By setting SiteId="*" you are not searching for a name 
> you are searching for the site id based on the hash of the name. Looking at 
> the code in scaweb.cpp function ScaWebFindBase() I think site id takes 
> precedence over name, so you could set the name to anything but as long as 
> the site id is set correctly it will find the site.
>
> I hope this helps.
>
> Neil
>
> -----Original Message-----
> From: Robert O'Brien [mailto:robert.obr...@microsoft.com]
> Sent: 09 April 2009 17:50
> To: 'General discussion for Windows Installer XML toolset.'; 
> 'tomtr...@artizan.com'; Neil Sleightholm
> Cc: Dmitry Frenkel; Kiran Challa
> Subject: RE: [WiX-users] is it a bug that iis:WebSite doesn't locate presence 
> of existing website using just the Name -> Description attribute value versus 
> port settings?
>
> In our case we are not so concerned about what SiteId=" will result in wrt 
> the actual SiteId value that gets generated and used when the msi determines 
> its necessary to create the iis:WebSite.
>
> What we are really interested in is the fact that including the SiteId=" 
> attribute, based on discussions in this thread and our test results over the 
> course of the past day, results in the iis extension searching the host for 
> whether or not the web site already exists using a case sensitive name that 
> matches the Description attribute value specified.
>
> This is important behavior to us because w/o SiteId=" attribute value in 
> place what we found is that the iis extension would search the host for 
> whether or not the web site already exists using the iis:WebAddress settings 
> and this was undersirable because this is something that is not always 
> predictable ad design time for all environments.  Example being cases where 
> ops creates/configures the web site in advance of the msi having every been 
> run.   Or we have cases where ops configures the web site left behind after 
> an uninstall where iis:WebSite associated component has Permanent="yes" and 
> then on next install we want to be able to find that site by name because the 
> port settings lookup won't produce an accurate result.
>
> -----Original Message-----
> From: Neil Sleightholm [mailto:n...@x2systems.com]
> Sent: Thursday, April 09, 2009 9:21 AM
> To: General discussion for Windows Installer XML toolset.; 
> tomtr...@artizan.com
> Cc: Dmitry Frenkel
> Subject: Re: [WiX-users] is it a bug that iis:WebSite doesn't locate presence 
> of existing website using just the Name -> Description attribute value versus 
> port settings?
>
> I think this thread may be misunderstanding what SiteId=" means. I means use 
> the IIS6 default of setting the site id to the hash of the name, I don't 
> believe it is triggering a search of the description. A site id of 1 is the 
> default of the "Default Web Site" created when IIS is installed. The hashing 
> algorithm can generate a duplicate site id in which case IIS adds one until 
> it finds a free number. See here for more details: 
> http://blogs.msdn.com/mpoulson/archive/2006/03/06/544893.aspx
>
> Neil
>   


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to