From aa8caeed85473534a8f984748fc764eee33d75c5 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Thu, 8 Dec 2011 05:03:01 +0000 Subject: [PATCH] Testing --- Database/Database-Constructors.cs | 13 +++++++------ Site5-Sep/web.config | 2 +- Site5/web.config | 5 +++++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Database/Database-Constructors.cs b/Database/Database-Constructors.cs index 3befe015..68e17fca 100644 --- a/Database/Database-Constructors.cs +++ b/Database/Database-Constructors.cs @@ -6,6 +6,7 @@ using System.Configuration; using System.IO; using System.Web; using Activizr.Basic.Diagnostics; +using MySql.Data; namespace Activizr.Database { @@ -17,7 +18,7 @@ namespace Activizr.Database public static PirateDb GetDatabase() { // First, check if a previous invocation has put anything in the cashe. - string connectionString = CachedConnectionString; + string connectionString = _cachedConnectionString; // During a cacheless invocation, the app/web config has priority. if (connectionString == null && ConfigurationManager.ConnectionStrings["Activizr"] != null) @@ -102,9 +103,9 @@ namespace Activizr.Database } // Now write the correct data to the cache, for faster lookup next time. - if (CachedConnectionString == null) + if (_cachedConnectionString == null) { - CachedConnectionString = connectionString; + _cachedConnectionString = connectionString; } PirateDb db = null; @@ -195,9 +196,9 @@ namespace Activizr.Database } // Now write the correct data to the cache, for faster lookup next time - if (CachedConnectionString == null) + if (_cachedConnectionString == null) { - CachedConnectionString = connectionString; + _cachedConnectionString = connectionString; } return new PirateDb(DbProviderFactories.GetFactory(DefaultProviderName), connectionString); @@ -221,6 +222,6 @@ namespace Activizr.Database private const string DefaultProviderName = "MySql.Data.SqlClient"; // The cached values used by GetDatabase() - private static string CachedConnectionString = null; + private static string _cachedConnectionString = null; } } \ No newline at end of file diff --git a/Site5-Sep/web.config b/Site5-Sep/web.config index a19ec94a..2736fa5f 100644 --- a/Site5-Sep/web.config +++ b/Site5-Sep/web.config @@ -94,7 +94,7 @@ - + diff --git a/Site5/web.config b/Site5/web.config index 51ed121e..58559140 100644 --- a/Site5/web.config +++ b/Site5/web.config @@ -8,4 +8,9 @@ + + + + +