Skip to content

Commit c4ecae2

Browse files
committed
Replaced Secrets.xml with local ConnectionStrings.config
I prefer using the secrets file. But for some reason the values aren't coming through correctly. I'd like to reevaluate that. But, for now, I'm returning to the tried and true approach, which is known to work correctly.
1 parent a43193e commit c4ecae2

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,7 @@ FakesAssemblies/
196196
GeneratedArtifacts/
197197
_Pvt_Extensions/
198198
ModelManifest.xml
199-
.vs
199+
.vs
200+
201+
# Custom
202+
ConnectionStrings.config

Ignia.Topics.Web.Mvc.Host/Ignia.Topics.Web.Mvc.Host.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
</ItemGroup>
114114
<ItemGroup>
115115
<Content Include="Views\web.config" />
116+
<Content Include="Configuration\ConnectionStrings.config" />
116117
<None Include="packages.config" />
117118
<None Include="Web.Debug.config">
118119
<DependentUpon>Web.config</DependentUpon>

Ignia.Topics.Web.Mvc.Host/Web.config

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,16 @@
44
https://go.microsoft.com/fwlink/?LinkId=301880
55
-->
66
<configuration>
7-
<configSections>
8-
<section name="configBuilders" type="System.Configuration.ConfigurationBuildersSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" restartOnExternalChanges="false" requirePermission="false" />
9-
</configSections>
10-
<configBuilders>
11-
<builders>
12-
<add name="ConnectionStrings" mode="Greedy" prefix="ConnectionStrings:" stripprefix="true" userSecretsId="27074c51-842d-4d75-b622-4c3b6dafeb56" type="Microsoft.Configuration.ConfigurationBuilders.UserSecretsConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.UserSecrets, Version=1.0.0.0, Culture=neutral" />
13-
</builders>
14-
</configBuilders>
7+
158
<appSettings>
169
<add key="webpages:Version" value="3.0.0.0" />
1710
<add key="webpages:Enabled" value="false" />
1811
<add key="ClientValidationEnabled" value="true" />
1912
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
2013
</appSettings>
21-
<connectionStrings configBuilders="ConnectionStrings"></connectionStrings>
14+
15+
<connectionStrings configSource="Configuration\ConnectionStrings.config"></connectionStrings>
16+
2217
<system.web>
2318
<compilation debug="true" targetFramework="4.8">
2419
<assemblies>

Ignia.Topics.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ EndProject
2121
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0D5A35CE-F5A4-4DDF-8938-8B1116CDF58E}"
2222
ProjectSection(SolutionItems) = preProject
2323
.editorconfig = .editorconfig
24+
.gitignore = .gitignore
2425
GitVersion.yml = GitVersion.yml
2526
README.md = README.md
2627
EndProjectSection

0 commit comments

Comments
 (0)