Skip to content

Commit

Permalink
Added checking <connectionStrings> in web.config in addition to o…
Browse files Browse the repository at this point in the history
…ld `appSettings`
  • Loading branch information
kohenkatz committed May 5, 2013
1 parent 9f1ead9 commit 221d83c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MongoMembership/Utils/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public static string GetConnectionStringByName(string connectionsettingskeys)
if (name.IsNullOrEmpty())
continue;

var connectionString = ConfigurationManager.ConnectionStrings[name];
if (connectionString != null)
return connectionString.ConnectionString;

connectionString = ConfigurationManager.AppSettings.Get(name);
if (connectionString == null)
continue;
Expand Down

0 comments on commit 221d83c

Please sign in to comment.