瀏覽代碼

NEW Ajout de profil de publication Release/Debug

julien.legrand 9 年之前
父節點
當前提交
e0e7e2f26a

+ 6 - 0
Web/CG67.FicheCollege.Web/CG67.FicheCollege.Web.csproj

@@ -238,6 +238,12 @@
     <None Include="Properties\PublishProfiles\Etud.pubxml" />
     <None Include="Properties\PublishProfiles\Prod.pubxml" />
     <None Include="Properties\PublishProfiles\profildeploiement.pubxml" />
+    <None Include="Web.Debug.config">
+      <DependentUpon>Web.config</DependentUpon>
+    </None>
+    <None Include="Web.Release.config">
+      <DependentUpon>Web.config</DependentUpon>
+    </None>
     <None Include="xls\Pilotes.xls" />
     <None Include="xslt\Pilotes.xls" />
   </ItemGroup>

+ 31 - 0
Web/CG67.FicheCollege.Web/Web.Debug.config

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Pour plus d'informations sur l'utilisation de la transformation web.config, consultez la page http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+  <!--
+    Dans l'exemple ci-dessous, la transformation "SetAttributes" changera la valeur de 
+    "connectionString" afin d'utiliser "ReleaseSQLServer" uniquement lorsque le localisateur "Match" 
+    trouve un attribut "name" qui a une valeur "MyDB".
+    
+    <connectionStrings>
+      <add name="MyDB" 
+        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" 
+        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+    </connectionStrings>
+  -->
+  <system.web>
+    <!--
+      
+      Dans l'exemple ci-dessous, la transformation "Replace" remplacera toute la section 
+      <customErrors>  de votre fichier web.config.
+      Dans la mesure où il n'y a qu'une section customErrors sous le 
+      nœud <system.web>, il n'est pas nécessaire d'utiliser l'attribut "xdt:Locator".
+      
+      <customErrors defaultRedirect="GenericError.htm"
+        mode="RemoteOnly" xdt:Transform="Replace">
+        <error statusCode="500" redirect="InternalError.htm"/>
+      </customErrors>
+    -->
+  </system.web>
+</configuration>

+ 38 - 0
Web/CG67.FicheCollege.Web/Web.Release.config

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Pour plus d'informations sur l'utilisation de la transformation web.config, consultez la page http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+  <!--
+    Dans l'exemple ci-dessous, la transformation "SetAttributes" changera la valeur de 
+    "connectionString" afin d'utiliser "ReleaseSQLServer" uniquement lorsque le localisateur "Match" 
+    trouve un attribut "name" qui a une valeur "MyDB".
+    
+    <connectionStrings>
+      <add name="MyDB" 
+        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" 
+        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+    </connectionStrings>
+  -->
+  <appSettings>
+    <add key="ConnexionStringSic"
+         value="Data Source=MSSQL-02\SQLSTD2K14;Initial Catalog=TSic;User Id=UserTSicRW;password=K5dkV6FXgZ2Q"
+         xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
+  </appSettings>
+    
+  <system.web>
+    <compilation xdt:Transform="RemoveAttributes(debug)" />
+    <!--
+      
+      Dans l'exemple ci-dessous, la transformation "Replace" remplacera toute la section 
+      <customErrors>  de votre fichier web.config.
+      Dans la mesure où il n'y a qu'une section customErrors sous le 
+      nœud <system.web>, il n'est pas nécessaire d'utiliser l'attribut "xdt:Locator".
+      
+      <customErrors defaultRedirect="GenericError.htm"
+        mode="RemoteOnly" xdt:Transform="Replace">
+        <error statusCode="500" redirect="InternalError.htm"/>
+      </customErrors>
+    -->
+  </system.web>
+</configuration>

+ 2 - 1
Web/CG67.FicheCollege.Web/Web.config

@@ -8,7 +8,8 @@
     <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
   </connectionStrings>
   <appSettings>
-    <add key="ConnexionStringSic" value="Data Source=MSSQL-02\SQLSTD2K14;Initial Catalog=TSic;User Id=UserTSicRW;password=K5dkV6FXgZ2Q"/>
+    <add key="ConnexionStringSic" value="Data Source=T-MSSQL-02\SQLSTD2K14;Initial Catalog=TSic;User Id=UserTSicRW;password=K5dkV6FXgZ2Q"/>
+    
     <!--   <add key="ConnexionStringOracleCollege" value="Data Source=PCOL;User Id=college;Password=college;"/> -->
     <add key="ConnexionStringAccess" value="Provider=microsoft.jet.oledb.4.0;Data Source=\\Moder\App_production\College\data\Base\BD Collège_prod.mdb;Persist Security Info=False;"/>
     <add key="ConnexionStringOracleSubvention" value="Data Source=SGFP;User Id=ASTRE;Password=ASTRE;"/>