Is setting “ASP.NET Impersonation” possible using

2019-07-05 00:10发布

I have this component in my .wxs file:

  <Component Id="Component.IisConfiguration" Guid="[COMPONENT_GUID_IISSITE]">
    <iis:WebAppPool Id="IIS.AppPool" Name="[WEB_APP_POOL_NAME]" Identity="networkService" ManagedRuntimeVersion="v4.0" />
    <iis:WebSite Id="IIS.WebSite" Description="[WEB_APP_NAME]" SiteId="[WEB_APP_SITEID]" Directory="TARGETDIR" >          
      <iis:WebApplication Id="IIS.WebSite.Application" Name="[WEB_APP_POOL_NAME]" WebAppPool="IIS.AppPool" />
      <iis:WebAddress Id="IIS.WebSite.WebAddress.Port" Port="[WEB_APP_ADDRESS_PORT]" />
      <iis:WebDirProperties Id="IIS.WebSite.Authentication" WindowsAuthentication="yes"  />
    </iis:WebSite>
  </Component>

Is it possible to set "ASP.NET Impersonation" anywhere ?

标签: wix
1条回答
Deceive 欺骗
2楼-- · 2019-07-05 00:24

It seems there's no out-of-the-box switch for this. You can have a custom action which calls:

appcmd set config /commit:WEBROOT/section:identity /impersonate:true

See this article for more information.

On the other hand, you can always set this setting on the application level, and use the standard XmlConfig element to modify the web.config file for this.

查看更多
登录 后发表回答