I have a bug with the latest versions of Wix (3.5 and 3.6), when trying to create a virtual directory with IIS7.
Here is the code I use : <Property Id="TARGETVDIR" Value="Admin" /> <Property Id="WEBSITE_PORT" Value="80"/> <Property Id="WEBSITE_IP" Value="*"/> <Property Id="SITEID" Value="1" /> <iis:WebDirProperties Id="AdminWebDirProperties" Execute="no" Script="yes" Read="yes" WindowsAuthentication="yes" AnonymousAccess="yes" IIsControlledPassword="yes" DefaultDocuments="default.aspx" Write="no" LogVisits="yes" Index="no" /> <iis:WebSite Id="AdminWebSite" Description="Admin Web Site" SiteId="[SITEID]"> <iis:WebAddress Id="AdminWebAddress" Port="80" /> </iis:WebSite> <ComponentGroup Id="AdminWebSiteComponentGroup"> <Component Id="AdminWebSiteIIs6Component" Guid="{D9F0F8AB-4DE8-4734-9B3C-F798A6D3227D}" Directory="TARGETDIR" KeyPath="yes"> <Condition><![CDATA[IISMAJORVERSION >= "#6" AND TARGETVDIR]]></Condition> <iis:WebAppPool Id="AdminIIs6AppPool" Name="Admin" Identity="networkService" /> <iis:WebVirtualDir Id="AdminIIs6VirtualDir" Alias="[TARGETVDIR]" Directory="AdminWebDir" WebSite="AdminWebSite" DirProperties="AdminWebDirProperties"> <iis:WebApplication Id="AdminIIs6Application" Name="Admin" WebAppPool="AdminIIs6AppPool" /> </iis:WebVirtualDir> </Component> <Component Id="AdminWebSiteIIs6SiteRootComponent" Guid="{C04D607C-4F52-4FC2-B3E2-00ACBF94B0FC}" Directory="TARGETDIR" KeyPath="yes" > <Condition><![CDATA[IISMAJORVERSION >= "#6" AND NOT TARGETVDIR]]></Condition> <iis:WebAppPool Id="AdminIIs6SiteRootAppPool" Name="Admin" Identity="networkService" /> <iis:WebSite Id="AdminIIs6SiteRootWebSite" ConfigureIfExists="yes" SiteId="[SITEID]" Directory="AdminWebDir" DirProperties="AdminWebDirProperties" Description="Admin"> <iis:WebAddress Id="AdminIIs6SiteRootWebAddress" Port="[WEBSITE_PORT]" IP="[WEBSITE_IP]" /> <iis:WebApplication Id="AdminIIs6SiteRootApplication" Name="Admin" WebAppPool="AdminIIs6SiteRootAppPool" /> </iis:WebSite> </Component> </ComponentGroup> When I do not set TARGETVDIR, the code works fine on IIS7. But when I set TARGETVDIR (that is : I want to create a virtual directory into the default web site), I get : Action 15:53:29: StartIIS7ConfigTransaction. Starting IIS Config Transaction Action 15:53:30: RollbackIIS7ConfigTransaction. Rolling back IIS Config Transaction Action 15:53:30: CommitIIS7ConfigTransaction. Committing IIS Config Transaction Action 15:53:30: WriteIIS7ConfigChanges. Installing Config Keys and Values WriteIIS7ConfigChanges: Error 0x80070002: Site not found for create application WriteIIS7ConfigChanges: Error 0x80070002: Failed to configure IIS application. WriteIIS7ConfigChanges: Error 0x80070002: WriteIIS7ConfigChanges Failed. CustomAction WriteIIS7ConfigChanges returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox) Action ended 15:53:30: InstallFinalize. Return value 3. Note that the above code works fine with IIS6, so I guess there is a bug in the IIS7 helpers... Any idea on how to fix the problem, without using custom actions ? JC ------------------------------------------------------------------------------ Virtualization is moving to the mainstream and overtaking non-virtualized environment for deploying applications. Does it make network security easier or more difficult to achieve? Read this whitepaper to separate the two and get a better understanding. http://p.sf.net/sfu/hp-phase2-d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users