{
public static class OutputCache
{
+ internal const string DEFAULT_PROVIDER_NAME = "AspNetInternalProvider";
+
static readonly object initLock = new object ();
static bool initialized;
static string defaultProviderName;
public static string DefaultProviderName {
get {
Init ();
+ if (String.IsNullOrEmpty (defaultProviderName))
+ return DEFAULT_PROVIDER_NAME;
+
return defaultProviderName;
}
}
static OutputCacheProvider LoadProvider (ProviderSettings ps)
{
- Type type = HttpApplication.LoadType (ps.Type, true);
+ Type type = HttpApplication.LoadType (ps.Type, false);
+ if (type == null)
+ throw new ConfigurationErrorsException (String.Format ("Could not load type '{0}'.", ps.Type));
+
var ret = Activator.CreateInstance (type) as OutputCacheProvider;
ret.Initialize (ps.Name, ps.Parameters);