سؤال

In our WIX installer we create several application pools for various components, however our .net 1.1 application pool always ends up being on .net 2.0 after the install has finished.

This causes us to manually fix the application pool that we have created back to 1.1 after each install and upgrade.

My question is is there a way around it, to get the installer to register it correctly as a 1.1 application pool rather than changing it to the 2.0 application pool?

Our code for creating the application pools:

<Component Id ="WebApps.Component" Guid="{5F518238-F564-43ff-A249-F87C23E02B52}">
            <CreateFolder />
            <iis:WebAppPool
               Id="V1WebAppPool"
               Name=".Net 1.1 App Pool"
               ManagedRuntimeVersion="v1.1"
               Identity="networkService">
            </iis:WebAppPool>
            <iis:WebAppPool
               Id="V2WebAppPool"
               Name=".Net 2.0 App Pool"
               ManagedRuntimeVersion="v2.0"
               Identity="networkService">
            </iis:WebAppPool>
            <iis:WebAppPool
               Id="V4WebAppPool"
               Name=".Net 4.0 App Pool"
               ManagedRuntimeVersion="v4.0"
               Identity="networkService">
            </iis:WebAppPool>
         </Component>
هل كانت مفيدة؟

المحلول

Have a look at this Creating a WIX Installer for ASP.NET Web Applications

The code section for the asp.net version

    <!-- Switch ASP.NET to version 2.0 -->
    <CustomAction Id="MakeWepApp20" Directory="MYWEBWEBSITE" 
      ExeCommand="[ASPNETREGIIS] -norestart -s W3SVC/1/ROOT/[WEB_APP_NAME]" 
      Return="check"/>

    <InstallExecuteSequence>
        <Custom Action="MakeWepApp20" After="InstallFinalize">
               ASPNETREGIIS AND NOT Installed</Custom>
    </InstallExecuteSequence>

It's the CustomAction that sets the version of ASP, you could create a condition that will run the right CustomAction to Switch between versions. Here's a link to switch versions.

HTH

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top