public virtual object CreateDeprecatedConfigContext (string configPath)
{
- throw new NotImplementedException ();
+ return new HttpConfigurationContext(configPath);
}
public virtual string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider,
java.lang.ClassLoader cl = (java.lang.ClassLoader) AppDomain.CurrentDomain.GetData ("GH_ContextClassLoader");
if (cl == null)
return null;
- java.net.URL url = cl.getResource ("META-INF/web.config");
- if (url == null)
+ java.io.InputStream wcs = cl.getResourceAsStream ("META-INF/web.config");
+ if (wcs == null)
return null;
+ wcs.close ();
+
return "/META-INF/web.config";
}
#else
public string MapPath (string virtualPath)
{
+ if (!String.IsNullOrEmpty (virtualPath)) {
+ if (virtualPath.StartsWith (System.Web.Compilation.BuildManager.FAKE_VIRTUAL_PATH_PREFIX, StringComparison.Ordinal))
+ return HttpRuntime.AppDomainAppPath;
+ }
+
if (map != null)
return MapPathFromMapper (virtualPath);
else if (HttpContext.Current != null && HttpContext.Current.Request != null)
throw new HttpException ("Invalid virtual directory: " + virtualPath);
}
- string GetWebConfigFileName (string dir)
+ internal static string GetWebConfigFileName (string dir)
{
#if TARGET_J2EE
DirectoryInfo d = GetCaseSensitiveExistingDirectory (new DirectoryInfo (dir));
if (File.Exists (file))
return file;
}
-#endif
} else {
Assembly asm = Assembly.GetEntryAssembly () ?? Assembly.GetCallingAssembly ();
string name = Path.GetFileName (asm.Location);
return file;
}
}
-
+#endif
return null;
}
#if TARGET_J2EE
return configPath == MachinePath || configPath == MachineWebPath;
case ConfigurationAllowDefinition.MachineToWebRoot:
case ConfigurationAllowDefinition.MachineToApplication:
- return configPath == MachinePath || configPath == MachineWebPath || configPath == "/" ||
- configPath == HttpRuntime.AppDomainAppVirtualPath;
+ return (String.Compare (configPath, MachinePath, StringComparison.Ordinal) == 0) ||
+ (String.Compare (configPath, MachineWebPath, StringComparison.Ordinal) == 0) ||
+ (String.Compare (configPath, "/", StringComparison.Ordinal) == 0) ||
+ (String.Compare (configPath, "~", StringComparison.Ordinal) == 0) ||
+ (String.Compare (configPath, HttpRuntime.AppDomainAppVirtualPath) == 0);
default:
return true;
}
java.lang.ClassLoader cl = (java.lang.ClassLoader) AppDomain.CurrentDomain.GetData ("GH_ContextClassLoader");
if (cl != null) {
java.io.InputStream inputStream = cl.getResourceAsStream (streamName);
- return (Stream) vmw.common.IOUtils.getStream (inputStream);
+ return new System.Web.J2EE.J2EEUtils.InputStreamWrapper (inputStream);
}
}
#endif