I have created WiX installer package for the new project I am working on and 
have a little unresolved issue related to proper registering the web 
application into IIS7.

The problem is that my web application is registered with incorrect Physical 
Path credentials property value (this property can be accessed through IIS7 by 
focusing the web app node and then opening its Advanced settings dialog box). 
After installation of my application the value is set to a 'specific user' with 
username 'name'. Such user of course does not exist in my environment, which 
causes the web app to fail on 500.19 when trying to open it in the browser.

So, after installing the app I have to open IIS and rest the Physical Path 
Credentials property to 'application user (pass-through authentication)', in 
order to force the web app to access its virtual directory using application 
pool's identity. This manual change of that property solves the problem..

Does anyone know how to change WiX behavior, so that Physical Path Credentials 
is set to 'application user' right out-from-the-box without any need to 
manually repair the value?

This is the fragment I use for configuring the IIS part of my solution:

    <?xml version="1.0" encoding="UTF-8"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";
         xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension";
          xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>

      <Fragment>
        <!-- Install to default web site -->
        <iis:WebSite Id="DefaultWebSite" Description='Default Web Site'>
          <iis:WebAddress Id="AllUnassigned" Port="80" />
        </iis:WebSite>

        <DirectoryRef Id="WebSiteContentDir">
          <!-- Configuring app pool -->
          <Component Id="ApplicationPoolComponent" Guid="{MY-GUID}" 
KeyPath="yes">
            <util:User Id="ApplicationPoolUser" CreateUser="no"
                   Domain="MYDOMAIN" Name="MYUSER"
                   Password="MYPWD" />

            <iis:WebAppPool Id="ApplicationPool" Name="MyApp" Identity="other" 
User="ApplicationPoolUser"
                        ManagedPipelineMode="classic" 
ManagedRuntimeVersion="v4.0" />
          </Component>

          <!-- Configuring virtual dir -->
          <Component Id="VirtualDirComponent" Guid="{MY-GUID}" KeyPath="yes" >
            <iis:WebVirtualDir Id="VirtualDir" Alias="MyApp" 
Directory="WebSiteContentDir" WebSite="DefaultWebSite">
              <iis:WebDirProperties Id="VirtualDirProperties" 
WindowsAuthentication="yes" />
              <iis:WebApplication Id="WebApplication" Name="MyApp" 
WebAppPool="ApplicationPool" />
            </iis:WebVirtualDir>        
          </Component>
      
        </DirectoryRef>
      </Fragment>
    </Wix>

Ww have already run into this issue on other projects and always solved using a 
powershell script fixing that property value that was executed automatically 
during the installation. I believe there must be a way to make WiX install it 
the requested way and hope to find an answer. Thanks in advance.

Marek

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to