Generally, your User element authoring should look something like this:

    <util:User Id="AppPoolUser" CreateUser="no" FailIfExists="no" 
LogonAsService="yes"  RemoveOnUninstall="no" UpdateIfExists="yes" 
Name="[ACCOUNT_NAME]" Password="[ACCOUNT_PASSWORD]" />

The key difference is that your authoring is missing the property dereferences 
(the square brackets).

Also, you can pass the fully-qualified ACCOUNT_NAME as a unit (ours is a UPN, 
but I've had it work in NT format too).

--
John Merryweather Cooper
Build & Install Engineer - ESA
Jack Henry & Associates, Inc.(r)
Shawnee Mission, KS  66227
Office:  913-341-3434 x791011
jocoo...@jackhenry.com
www.jackhenry.com 



-----Original Message-----
From: marz...@email.cz [mailto:marz...@email.cz] 
Sent: Tuesday, June 19, 2012 8:57 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] IisExtension: How to initialize IIS web app's Physical 
Path Credentials property in WiX

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
NOTICE: This electronic mail message and any files transmitted with it are 
intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged 
information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.


------------------------------------------------------------------------------
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