Author: kostat
Date: 2007-03-22 11:45:31 -0500 (Thu, 22 Mar 2007)
New Revision: 74816
Modified:
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/ServletWorkerRequest.jvm.cs
Log:
Provide extended error info if cross application MapPath fails
Modified:
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/ServletWorkerRequest.jvm.cs
===================================================================
---
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/ServletWorkerRequest.jvm.cs
2007-03-22 16:42:30 UTC (rev 74815)
+++
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/ServletWorkerRequest.jvm.cs
2007-03-22 16:45:31 UTC (rev 74816)
@@ -349,12 +349,15 @@
if (contextPath.Length != appVirtualPathIndex ||
string.Compare (contextPath, 0, virtualPath, 0,
appVirtualPathIndex, StringComparison.InvariantCultureIgnoreCase) != 0) {
+ string crossContextPath = virtualPath;
if (virtualPath.Length > appVirtualPathIndex)
- virtualPath = virtualPath.Remove
(appVirtualPathIndex);
+ crossContextPath = virtualPath.Remove
(appVirtualPathIndex);
ServletContext context =
config.getServletContext ().getContext (virtualPath);
string retVal;
if (context == null || ((retVal =
context.getRealPath (appVirtualPath)) == null))
- throw new HttpException ("MapPath:
Mapping across applications not allowed");
+ throw new HttpException (
+ String.Format ("MapPath:
Mapping across applications is not allowed. ApplicationPath is '{0}',
VirtualPath is '{1}'.",
+ contextPath, virtualPath));
return retVal;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches