Permalink
Browse files

2005-12-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* WebConfigurationSettings.cs: patch by Cyrille Colin that sets the
	right application path even when MapPath fails. Closes bug #77044.


svn path=/trunk/mcs/; revision=54716
  • Loading branch information...
gonzalop committed Dec 22, 2005
1 parent ec63f04 commit 0bb5724e38fe446924d6ce10440cd718f82e464c
@@ -1,3 +1,8 @@
+2005-12-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * WebConfigurationSettings.cs: patch by Cyrille Colin that sets the
+ right application path even when MapPath fails. Closes bug #77044.
+
2005-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* WebConfigurationSettings.cs: don't fail if <location> has more
@@ -210,7 +210,12 @@ ConfigurationData GetConfigFromFileName (string filepath, HttpContext context)
if (data != null)
return data;
- string realpath = context.Request.MapPath (dir);
+ string realpath = null;
+ try {
+ realpath = context.Request.MapPath (dir);
+ } catch {
+ realpath = context.Request.MapPath (HttpRuntime.AppDomainAppVirtualPath);
+ }
string lower = Path.Combine (realpath, "web.config");
bool isLower = File.Exists (lower);
string wcfile = null;

0 comments on commit 0bb5724

Please sign in to comment.