Это web.config
преобразование не работает. Когда я устанавливаю свою среду VS на Test
, я все еще подключаюсь к своей локальной БД. Есть идеи, что я могу делать не так?
web.config
:
<add name="pardbContext"
connectionString="data source=localhost;initial catalog=pardb;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"
providerName="System.Data.SqlClient" />
web.Test.config
:
<add name="pardbContext"
connectionString="data source=dev01;initial catalog=pardbdev;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"
providerName="System.Data.SqlClient"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
Больше содержания Web.test.config
здесь как относится к части неудачного совпадения:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<connectionStrings>
<add name="pardbContext"
connectionString="data source=dev01;initial catalog=pardbdev;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"
providerName="System.Data.SqlClient"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
<appSettings>
. . .
</appSettings>
<system.web>
<sessionState allowCustomSqlDatabase="true" mode="SQLServer"
sqlCommandTimeout="14400"
sqlConnectionString="Data Source=Dev01;Initial Catalog=ASPState; Integrated Security = True"
timeout="240" xdt:Transform="Replace"/>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<httpRuntime executionTimeout="600" xdt:Transform="SetAttributes"></httpRuntime>
</system.web>
<system.webServer>
<rewrite xdt:Transform="Insert">
<rules>
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>
</rules>
</rewrite>
</system.webServer>
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="customWebSiteBinding">
<security mode="Transport" xdt:Transform="Insert"/>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
<LodgexConfiguration>
<ReportServer>
<ReportServerURL>
<ReportServerURL value="http://dev01/ReportServer"
xdt:Transform="Replace" />
</ReportServerURL>
<ItemPath value="/Reports/par/" xdt:Transform="Replace" />
</ReportServer>
</LodgexConfiguration>
</configuration>