Author: kostat
Date: 2007-03-29 11:55:30 -0500 (Thu, 29 Mar 2007)
New Revision: 75152
Modified:
trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
Log:
correctly remove the ApplicationPath from url
Modified: trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs 2007-03-29
16:53:37 UTC (rev 75151)
+++ trunk/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs 2007-03-29
16:55:30 UTC (rev 75152)
@@ -147,7 +147,7 @@
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler
(CurrentDomain_AssemblyResolve);
try {
//Try to load
the global resources
-
HttpContext.AppGlobalResourcesAssembly = GetCachedAssembly (context,
"app_globalresources");
+
HttpContext.AppGlobalResourcesAssembly = GetCachedAssembly (context,
context.Request.ApplicationPath + "/app_globalresources");
}
catch (Exception ex) {
#if DEBUG
@@ -393,7 +393,7 @@
}
private bool InternalCompile()
{
- string fileName = Path.GetFileName(_url);
+ string fileName = VirtualPathUtility.GetFileName (_url);
string fullFileName = (fileName.ToLower () ==
"global.asax") ? _url : _context.Request.MapPath (_url);
#if DEBUG
@@ -541,7 +541,7 @@
private string GetDescFromUrl()
{
- string fileName = Path.GetFileName(_url);
+ string fileName = VirtualPathUtility.GetFileName (_url);
if (fileName.ToLower() == "global.asax")
return "global.asax.xml";
@@ -553,11 +553,11 @@
private string GetIdFromUrl(string path)
{
- path = path.Trim('/');
- string fileName = Path.GetFileName(path);
+ string fileName = VirtualPathUtility.GetFileName(path);
string id = string.Empty;
- path = path.Substring (path.IndexOf ("/") + 1);
+ if (VirtualPathUtility.IsAbsolute (path))
+ path = path.Substring
(_context.Request.ApplicationPath.Length + 1);
if (path.Length > fileName.Length)
id = "." + path.Substring(0,path.Length -
fileName.Length).Replace('/','_');
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches