Thanks John, for the hint. Unfortunately it did not resolve my issue.
To make my question and related fragment (see below) more clear:
1) I have no issue with setting correct credentials to app pool itself, this 
works absolutely fine. My problem is, that virtual directory created by the 
installer is set not to use application pool's credentials to access its 
content and use some other user account called 'name'. I do not know where from 
this 'name' account arises from, it is never mentioned in my wix code..

2) of course, in real wix code I am using variables (wrapped inside square 
brackets) for domain, user account and password information. I replaced these 
in example code with constants, in order to keep the example as simple as 
possible. So assume that there really is in my environment a user account 
MYDOMAIN\MYUSER with password "MYPWD".

Anyway I have noticed some additional User element attributes in your example, 
which i have not been using (e.g. LogonAsService). I have tried to add these to 
my code, but it did not make any change.


-----Original Message-----
From: John Cooper 
Subject: Re: [WiX-users] IisExtension: How to initialize IIS web app's Physical 
Path Credentials property in WiX 
Date: 19.6. 2012, 16:13 
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

Reply via email to