Skip to content

Commit

Permalink
2005-12-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Browse files Browse the repository at this point in the history
	* 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 0bb5724
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions mcs/class/System.Web/System.Web.Configuration/ChangeLog
Original file line number Original file line Diff line number Diff line change
@@ -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> 2005-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>


* WebConfigurationSettings.cs: don't fail if <location> has more * WebConfigurationSettings.cs: don't fail if <location> has more
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ ConfigurationData GetConfigFromFileName (string filepath, HttpContext context)
if (data != null) if (data != null)
return data; 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"); string lower = Path.Combine (realpath, "web.config");
bool isLower = File.Exists (lower); bool isLower = File.Exists (lower);
string wcfile = null; string wcfile = null;
Expand Down

0 comments on commit 0bb5724

Please sign in to comment.