[Mono-bugs] [Bug 74883][Nor] New - Wrong Server.MapPath from subapplication

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 9 May 2005 09:42:58 -0400 (EDT)


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 m@pernecky.sk.

http://bugzilla.ximian.com/show_bug.cgi?id=74883

--- shadow/74883	2005-05-09 09:42:58.000000000 -0400
+++ shadow/74883.tmp.5292	2005-05-09 09:42:58.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 74883
+Product: Mono: Runtime
+Version: 1.1
+OS: other
+OS Details: RHEL 3
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: m@pernecky.sk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Wrong Server.MapPath from subapplication
+
+Description of Problem:
+When using mod_mono and having application that is not in root (e.g. /
+monoapp is the root) then <%=Server.MapPath ("/files")%> is equal to <%
+=Server.MapPath ("~/files")%> which is clearly bad in this case
+
+
+Steps to reproduce the problem:
+1. Create a web application in apache in config (root / is mapped to /var/
+www/html)
+MonoApplications "/test:/var/www/html/test"
+
+2. Create a aspx page:
+<%@ Page Language="C#" %>
+<p><%=Server.MapPath ("~/files")%></p>
+<p><%=Server.MapPath ("/files")%></p>
+
+Actual Results:
+/var/www/html/test/files
+/var/www/html/test/files
+
+Expected Results:
+/var/www/html/test/files
+/var/www/html/files
+
+The second command produces incorrect results.