On wix, can I install an application pool for a website?

I want to install the application pool for the site that I am installing, but there is no virtual directory or web application . The website is contained directly in the website entry in IIS, and I want wix to install the application pool for this website.

Is it possible?

+6
source share
2 answers

Did you consider the WebAppPool element ?

In this article, creating a web application installer ... can provide you with useful information, for example.

 <!-- Define App Pool - identity if not set defaults to: ApplicationPoolIdentity --> <iis:WebAppPool Id="AppPool" Name="[VD][WEBSITE_ID]" ManagedRuntimeVersion="v4.0" IdleTimeout="0" RecycleMinutes="0" ManagedPipelineMode="integrated"> </iis:WebAppPool> <iis:WebVirtualDir Id="VDir" Alias="[VD]" Directory="INSTALLLOCATION" WebSite="SelectedWebSite"> <iis:MimeMap Id="SilverlightMimeType" Extension=".xap" Type="application/x-silverlight-app" /> <iis:WebApplication Id="MyWebAppApplication" WebAppPool="AppPool" Name="[VD][WEBSITE_ID]" /> <iis:WebDirProperties Id="MyWebSite_Properties" AnonymousAccess="yes" WindowsAuthentication="no" DefaultDocuments="Default.aspx" /> </iis:WebVirtualDir> 

to connect them, the iis:WebApplication/@WebAppPool used to refer to AppPool iis:WebAppPool/@Id

Another suggestion is to upgrade WebApplication for WebSite, for example,

 <Component Id="WebSite" Guid="PUT-YOUR-GUID-HERE"> <CreateFolder/> <iis:WebSite Id="WebSite" Directory="WebSiteRoot" Description="[WEBSITEDESCRIPTION]" > <iis:WebApplication Id="WebSiteApplication" Name="[WEBSITEDESCRIPTION]" WebAppPool="MyAppPool" /> </iis:WebSite> <iis:WebAppPool Id="MyAppPool" Name="[APPPOOLNAME]" ManagedRuntimeVersion="v4.0"/> </Component> 
+8
source

@ user145400 said:

I really saw this question, and he concludes that wix has a strange limitation: it cannot install the application pool for the website, but it can do it for the virtual directory. I asked again, because I thought maybe it was fixed in a newer version. It has been said that, therefore, your answer does not really answer my question.

Yes, you can set the pool for the WebSite element, do it like this:

 <iis:WebAppPool Id="MyWebSite_AppPool" Name="[POOLNAME]" Identity="networkService" ManagedRuntimeVersion="v4.0" ManagedPipelineMode="integrated"/> <!--define web site--> <iis:WebSite Id="MyWebSite_Website" Description="[WEBSITENAME]" AutoStart="yes" StartOnInstall="yes" ConfigureIfExists="yes" Directory="INSTALLDIR"> <iis:WebApplication Id="MY_WebApp" Name="MY Web Site" WebAppPool="MyWebSite_AppPool" ScriptTimeout="360" /> </iis:WebSite> 

As you can see, using the iis:WebApplication element in the iis: WebSite element with the WebAppPool attribute it can be :)

+4
source

Source: https://habr.com/ru/post/977106/


All Articles