[Mono-bugs] [Bug 82061][Maj] New - HostingEnvironment.MapPath relative virtual path '~' not allowed here
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Jul 10 15:46:19 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by frankguerreroh at yahoo.com.
http://bugzilla.ximian.com/show_bug.cgi?id=82061
--- shadow/82061 2007-07-10 15:46:19.000000000 -0400
+++ shadow/82061.tmp.15029 2007-07-10 15:46:19.000000000 -0400
@@ -0,0 +1,64 @@
+Bug#: 82061
+Product: Mono: Class Libraries
+Version: 1.2
+OS: other
+OS Details: OpenSuSE 10.2
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: Sys.Web
+AssignedTo: mhabersack at novell.com
+ReportedBy: frankguerreroh at yahoo.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: HostingEnvironment.MapPath relative virtual path '~' not allowed here
+
+Description of Problem:
+
+The method System.Web.Hosting.HostingEnvironment.MapPath() is throwing an
+exception when using the parameter starting with "~".
+
+Steps to reproduce the problem:
+1. Setup mod_mono to run with apache. Make sure that mod-mono-server2.exe
+is running to use ASP.NET 2.0.
+
+2. Create an asp.net page with the following content
+<%@ Page Language="C#" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head><title></title></head>
+<body>
+ <form id="f" runat="server">
+ <%= System.Web.Hosting.HostingEnvironment.MapPath("~") %>
+ </form>
+</body>
+</html>
+
+3. Create a Web.config file that will allow you to see the error if you are
+not running the test case locally
+<?xml version="1.0"?>
+<configuration>
+ <system.web>
+ <customErrors mode="Off" />
+ </system.web>
+</configuration>
+
+Actual Results:
+Server Error in '/' Application
+The relative virtual path '~', is not allowed here.
+
+Description: Error processing request.
+
+Error Message: HTTP 500. System.ArgumentException: The relative virtual
+path '~', is not allowed here.
+
+Expected Results:
+The mapping of the virtual path root to the physical path on the server.
+This test works on windows XP using IIS Version: 5.1 and ASP.NET 2.0.50727
+and displays
+
+How often does this happen?
+Always
More information about the mono-bugs
mailing list