WIX : Valoriser le framework ASP.Net sur un répertoire virtuel
Bonjour,
je dois corriger une anomalie sur un projet de déploiement .Net réalisé avec WIX.
Le but est de forcer la version du framework ASP.Net sur un répertoire virtuel après sa création.
Les connaissances ayant disparu du projet je me mets dedans difficilement.
Je suis sur un IIS dont le Default Web Site est en 1.1. Je veux que mon répertoire virtuel soit en 2.0
Il y a bien des lignes qui indiquent ce changement mais elles ne semblent rien faire. Je ne trouve rien de plus sur internet et je commence à désespérer.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
|
<?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" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" xmlns:wixvs="http://schemas.microsoft.com/wix/WixVSExtension">
<?define NetVersion = 2.0.50727 ?>
<Product Id="*" Name="Ovali Client $(var.ProductVersion)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Orange Business Services" UpgradeCode="3C6E5A3D-4127-4F3F-9BE7-C1F2939C959C">
<Package Description="OvaliClient executable" Comments="Executable of OvaliClient" InstallerVersion="200" Compressed="yes" />
<!--Liste des prérequis-->
<Condition Message="You need to be an administrator to install this product.">Privileged</Condition>
<Condition Message="ASP.NET $(var.NetVersion) version does not exist">ASPNETVERSION</Condition>
<Condition Message="This application requires .NET Framework $(var.NetVersion)">Installed OR NETFRAMEWORK20</Condition>
<Condition Message="This application requires J# redistributable package 2.0 (x64 on 64 bits machines)">Installed OR JSHARPINSTALLED</Condition>
<Condition Message="IIS must be installed">Installed OR IIS_MAJOR_VERSION</Condition>
<Condition Message="Your install directory does not exist">DIREXIST</Condition>
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
<!--Test de l'existence du répertoire d'installation (d:\wwwroot par défaut)-->
<Property Id="DIREXIST">
<DirectorySearch Id="CheckDir" Path="[INSTALLDIR]" Depth="0" />
</Property>
<!-- TO/2011.021697-A.01 Determine the .Net framework root directory from the registry-->
<Property Id="FRAMEWORKROOT">
<RegistrySearch Id="FrameworkRootDir" Root="HKLM" Key="SOFTWARE\Microsoft\.NETFramework" Type="directory" Name="InstallRoot" Win64='yes' />
</Property>
<CustomAction Id="setFRAMEWORKDIR" Property="FRAMEWORKDIR" Value="[FRAMEWORKROOT]\v$(var.NetVersion)" />
<!--Test de l'existence de la version d'ASP.NET pour les alias IIS-->
<Property Id="ASPNETVERSION">
<DirectorySearch Id="CheckASPNETversion" Path="[FRAMEWORKDIR]" Depth="0" />
</Property>
<!--Test de l'installation de IIS-->
<Property Id="IIS_MAJOR_VERSION">
<RegistrySearch Id="CheckIISVersion" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp" Name="MajorVersion" Type="raw" />
</Property>
<!--Création de l'arborescence de l'installation-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INSTALLDIR" Name="wwwRoot">
<Directory Id="OvaliClient" Name="OvaliClient">
<Directory Id="binovaliclient" Name="binovaliclient">
<Component Id="OvaliValidator.asmx" DiskId="1" Guid="995DE7BD-E6D9-4B4F-A332-61B046119DAB">
<File Id="OvaliValidator.asmx" Name="OvaliValidator.asmx" Source="..\..\..\binovaliclient\OvaliValidator.asmx" />
<RemoveFile Id="removeOvaliValidator.aspx" Name="OvaliValidator.asmx" On="uninstall" />
</Component>
<Component Id="PrecompiledApp.config" DiskId="1" Guid="A8F94541-53CF-42A6-B688-5B1C0B198F5D">
<File Id="PrecompiledApp.config" Name="PrecompiledApp.config" Source="..\..\..\binovaliclient\PrecompiledApp.config" />
<RemoveFile Id="removePrecompiledApp.config" Name="PrecompiledApp.config" On="uninstall" />
</Component>
<Component Id="web.config" DiskId="1" Guid="D368A2CA-D0A7-4E48-8B0C-3C68E6225AC3">
<File Id="web.config" Name="web.config" Source="..\..\..\binovaliclient\web.config" />
<RemoveFile Id="removeweb.config" Name="web.config" On="uninstall" />
<!--Paramètrage des fichiers de config-->
<util:XmlFile Id='XmlFile_1' File='[INSTALLDIR]OvaliClient\binovaliclient\web.config' Action='setValue' Name='value' Value='[INSTALLDIR]Log\OvaliClient\OvaliError' ElementPath='//configuration/log4net/appender/file' Sequence='1' />
<util:XmlFile Id='XmlFile_2' File='[INSTALLDIR]OvaliClient\binovaliclient\web.config' Action='setValue' Name='path' Value='[INSTALLDIR]OvaliClient\Donnees\Enlecture\Xsd\request.xsd' ElementPath='//configuration/ovali/schemas/add' Sequence='2' />
<util:XmlFile Id='XmlFile_3' File='[INSTALLDIR]OvaliClient\binovaliclient\web.config' Action='setValue' Name='value' Value='[INSTALLDIR]OvaliClient\Donnees\Enlecture\Xml\variables.xml' ElementPath='//configuration/appSettings/add[\[]@key="FichierParameter"[\]]' Sequence='3' />
<util:XmlFile Id='XmlFile_4' File='[INSTALLDIR]OvaliClient\binovaliclient\web.config' Action='setValue' Name='value' Value='[INSTALLDIR]OvaliClient\Donnees\Enlecture\Xml\catalog.xml' ElementPath='//configuration/appSettings/add[\[]@key="Catalog_File_Path"[\]]' Sequence='4' />
<!--Fin paramètrage des fichiers de config-->
</Component>
<Directory Id="bin" Name="bin">
<Component Id="App_Code.compiled" DiskId="1" Guid="647E23A2-918A-4CB2-A232-6D0FC82062FA">
<File Id="App_Code.compiled" Name="App_Code.compiled" Source="..\..\..\binovaliclient\bin\App_Code.compiled" />
<RemoveFile Id="removeApp_Code.compiled" Name="App_Code.compiled" On="uninstall" />
</Component>
<Component Id="App_Code.dll" DiskId="1" Guid="AEACDCB8-DCB6-45E0-B217-F77786F00294">
<File Id="App_Code.dll" Name="App_Code.dll" Source="..\..\..\binovaliclient\bin\App_Code.dll" />
<RemoveFile Id="removeApp_Code.dll" Name="App_Code.dll" On="uninstall" />
</Component>
<Component Id="App_global.asax.compiled" DiskId="1" Guid="E09FD925-FB4F-4312-A2B0-A47021EBEC38">
<File Id="App_global.asax.compiled" Name="App_global.asax.compiled" Source="..\..\..\binovaliclient\bin\App_global.asax.compiled" />
<RemoveFile Id="removeApp_global.asax.compiled" Name="App_global.asax.compiled" On="uninstall" />
</Component>
<Component Id="App_global.asax.dll" DiskId="1" Guid="B0AC5C2E-1723-4697-B6E4-8C2F9DF221CA">
<File Id="App_global.asax.dll" Name="App_global.asax.dll" Source="..\..\..\binovaliclient\bin\App_global.asax.dll" />
<RemoveFile Id="removeApp_global.asax.dll" Name="App_global.asax.dll" On="uninstall" />
</Component>
<Component Id="com.equant.flsub.dll" DiskId="1" Guid="E50279B4-63F8-4B98-9C34-B0B3BB73AF25">
<File Id="com.equant.flsub.dll" Name="com.equant.flsub.dll" Source="..\..\..\binovaliclient\bin\com.equant.flsub.dll" />
<RemoveFile Id="removecom.equant.flsub.dll" Name="com.equant.flsub.dll" On="uninstall" />
</Component>
<Component Id="log4net.dll" DiskId="1" Guid="BDFD3471-6122-4F76-B1A3-A353A6C482BB">
<File Id="log4net.dll" Name="log4net.dll" Source="..\..\..\binovaliclient\bin\log4net.dll" />
<RemoveFile Id="removelog4net.dll" Name="log4net.dll" On="uninstall" />
</Component>
<Component Id="Dirbin" DiskId="1" Guid="B5D1681B-EC06-4f7f-AAD0-38853F38ABF5">
<CreateFolder/>
<RemoveFolder Id='bin' On='uninstall' />
</Component>
</Directory>
<!-- TO/2011.021697-A.01 -->
<!-- Create and configure the virtual directory and application. -->
<Component Id='C_VirtualDirComponent' Guid="14C1308F-2EBB-4341-98A4-8796C706EE23" Permanent='no' >
<iis:WebAppPool Id="OvaliClientAppPool" Name="OvaliClient" Identity="networkService" />
<iis:WebVirtualDir Id="VirtualDir" Alias="[TARGETVDIR]" Directory="binovaliclient" WebSite="DefaultWebSite" DirProperties="WebVirtualDirProperties" >
<iis:WebApplication Id='WebApplication' Name='OvaliClient' WebAppPool='OvaliClientAppPool'>
<!-- Required to run the application under the .net 2.0 framework -->
<iis:WebApplicationExtension Extension="*" CheckPath="no" Script="yes" Executable="[FRAMEWORKDIR]\aspnet_isapi.dll" Verbs="GET,HEAD,POST" />
</iis:WebApplication>
</iis:WebVirtualDir>
<CreateFolder />
</Component>
<!-- TO/2011.021697-A.01 Fin -->
<Component Id="Dirbinovaliclient" DiskId="1" Guid="F14C7EFC-0973-4b2b-8CA1-239566293918">
<CreateFolder/>
<RemoveFolder Id='binovaliclient' On='uninstall' />
</Component>
</Directory>
<!--Fin Directory binovaliclient-->
<Directory Id="Donnees" Name="Donnees">
<!--Gestion des permissions "read files" sur le répertoire-->
<Component Id ="AclComponent" Guid="17100DFD-2169-45cb-A8EB-9AF2E51CE276">
<CreateFolder>
<util:PermissionEx User="ASPNET" Read="yes" GenericRead="yes" ReadAttributes="yes" ReadPermission="yes" />
</CreateFolder>
</Component>
<!--Fin de Gestion des permissions "read files"-->
<Directory Id="EnLecture" Name="EnLecture">
<Directory Id="Xml" Name="Xml">
<Component Id="catalog.xml" DiskId="1" Guid="B9868EAD-C1E6-4C5D-B727-46FBB9366BE2">
<File Id="catalog.xml" Name="catalog.xml" Source="..\..\..\Donnees\EnLecture\Xml\catalog.xml" />
<RemoveFile Id="removecatalog.xml" Name="catalog.xml" On="uninstall" />
</Component>
<Component Id="variables.xml" DiskId="1" Guid="A7A1BFF1-0010-419B-B5B8-2ADF62604346">
<File Id="variables.xml" Name="variables.xml" Source="..\..\..\Donnees\EnLecture\Xml\variables.xml" />
<RemoveFile Id="removevariables.xml" Name="variables.xml" On="uninstall" />
</Component>
<Component Id="DirXml" DiskId="1" Guid="C16C9744-6AB9-4596-9E8A-8ACA20662FA0">
<CreateFolder/>
<RemoveFolder Id='Xml' On='uninstall' />
</Component>
</Directory>
<Directory Id="Xsd" Name="Xsd">
<Component Id="request.xsd" DiskId="1" Guid="803064E9-EA4B-4F76-B5F0-24EAB59D06F7">
<File Id="request.xsd" Name="request.xsd" Source="..\..\..\Donnees\EnLecture\Xsd\request.xsd" />
<RemoveFile Id="removerequest.xsd" Name="request.xsd" On="uninstall" />
</Component>
<Component Id="result.xsd" DiskId="1" Guid="9D951337-DD59-4431-AC69-533A07244230">
<File Id="result.xsd" Name="result.xsd" Source="..\..\..\Donnees\EnLecture\Xsd\result.xsd" />
<RemoveFile Id="removeresult.xsd" Name="result.xsd" On="uninstall" />
</Component>
<Component Id="DirXsd" DiskId="1" Guid="6FDE9CA8-A409-4b98-BDF1-2C4DBF746612">
<CreateFolder/>
<RemoveFolder Id='Xsd' On='uninstall' />
</Component>
</Directory>
<Component Id="DirEnLecture" DiskId="1" Guid="F1FA8314-8069-4272-933C-F7E19367EB51">
<CreateFolder/>
<RemoveFolder Id='EnLecture' On='uninstall' />
</Component>
</Directory>
<Component Id="DirDonnees" DiskId="1" Guid="E132DC88-A1C2-4823-B700-DF62B11C280B">
<CreateFolder/>
<RemoveFolder Id='Donnees' On='uninstall' />
</Component>
</Directory>
<!--Fin Directory Donnees-->
<Component Id="DirOvaliClient" DiskId="1" Guid="63E8BA70-25B1-4522-9DE1-6B1D98325208">
<CreateFolder/>
<RemoveFolder Id='OvaliClient' On='uninstall' />
</Component>
</Directory>
<!--Fin Directory OvaliClient-->
<Directory Id="log" Name="log">
<Directory Id="OvaliClient_log" Name="OvaliClient">
<!--Suppression de ce répertoire à la désinstallation-->
<Component Id="Compo_OvaliClient_log" DiskId="1" Guid="B7E4671C-E02D-4c92-A22E-66A68267E61C">
<CreateFolder/>
<RemoveFolder Id='OvaliClient_log' On='uninstall' />
</Component>
</Directory>
<!--Fin Directory OvaliClient_log-->
</Directory>
<!--Fin Directory log-->
</Directory>
<!--Fin Directory INSTALLDIR-->
</Directory>
<!--Fin Directory TARGETDIR-->
<Feature Id="DefaultFeature" Title="Main Feature" Level="1">
<ComponentRef Id="OvaliValidator.asmx" />
<ComponentRef Id="PrecompiledApp.config" />
<ComponentRef Id="web.config" />
<ComponentRef Id="App_Code.compiled" />
<ComponentRef Id="App_Code.dll" />
<ComponentRef Id="App_global.asax.compiled" />
<ComponentRef Id="App_global.asax.dll" />
<ComponentRef Id="com.equant.flsub.dll" />
<ComponentRef Id="log4net.dll" />
<ComponentRef Id="C_VirtualDirComponent" />
<ComponentRef Id="catalog.xml" />
<ComponentRef Id="variables.xml" />
<ComponentRef Id="request.xsd" />
<ComponentRef Id="result.xsd" />
<ComponentRef Id="Compo_OvaliClient_log"/>
<ComponentRef Id="Dirbin"/>
<ComponentRef Id="Dirbinovaliclient"/>
<ComponentRef Id="DirXml"/>
<ComponentRef Id="DirXsd"/>
<ComponentRef Id="DirEnLecture"/>
<ComponentRef Id="DirDonnees"/>
<ComponentRef Id="DirOvaliClient"/>
<ComponentRef Id="AclComponent"/>
</Feature>
<UI />
<iis:WebDirProperties Id="WebVirtualDirProperties" Execute="no" Script="yes" Read="yes" WindowsAuthentication="no" AnonymousAccess="yes" />
<!-- Web site is only created if it doesn't already exist -->
<iis:WebSite Id="DefaultWebSite" Description="Default Web Site">
<iis:WebAddress Id="AllAdresses" IP="*" Port="80" />
</iis:WebSite>
<!-- Ajout de la version 2.0.50727 d'ASP.NET à l'alias binovaliclient dans IIS-->
<CustomAction Id="MakeWepApp20" Directory="binovaliclient" ExeCommand="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -norestart -s W3SVC/1/ROOT/binovaliclient" Return="check"/>
<InstallExecuteSequence>
<Custom Action="MakeWepApp20" After="InstallFinalize">
FRAMEWORKDIR AND NOT Installed
</Custom>
</InstallExecuteSequence>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<!--<Property Id="INSTALLDIR" Value="FRAMEWORKROOT" />-->
<Property Id="TARGETVDIR" Value="binovaliclient" />
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Property Id="JSHARPINSTALLED">
<RegistrySearch Id="HASJSHARP" Root="HKLM" Key="SOFTWARE\Microsoft\Visual JSharp Setup\Redist\v$(var.NetVersion)" Type="raw" Name="Install" Win64='yes' />
</Property>
<PropertyRef Id="NETFRAMEWORK20" />
<Upgrade Id="3C6E5A3D-4127-4F3F-9BE7-C1F2939C959C">
<UpgradeVersion Minimum="1.3.0"
Maximum="$(var.ProductVersion)"
Property="PREVIOUSVERSIONSINSTALLED" IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<!--Gestion des icones orange et de la bannière Ovali-->
<UIRef Id="GenericToolUI" />
<Binary Id="BannerIcon" SourceFile="..\..\..\Installer\bannerOvali.bmp" />
<Binary Id="ErrorIcon" SourceFile="..\..\..\Installer\orange.ico" />
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize" />
</InstallExecuteSequence>
</Product>
</Wix> |
C'est un peu barbare je vous l'accorde mais j'ai du mal à voir ce qui est important ou non.
A priori la partie pour la détermination du framework est la suivante
Code:
1 2 3 4 5 6 7 8 9
|
<!-- Ajout de la version 2.0.50727 d'ASP.NET à l'alias binovaliclient dans IIS-->
<CustomAction Id="MakeWepApp20" Directory="binovaliclient" ExeCommand="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -norestart -s W3SVC/1/ROOT/binovaliclient" Return="check"/>
<InstallExecuteSequence>
<Custom Action="MakeWepApp20" After="InstallFinalize">
FRAMEWORKDIR AND NOT Installed
</Custom>
</InstallExecuteSequence> |
Quelqu'un aurait-il déjà rencontré un tel problème ?
Sachant que la ligne de commande est bonne car si je l'exécute dans une fenêtre DOS, la modification est bien faite