[Mono-bugs] [Bug 61524][Nor] New - AspGenerator - 404 error using "File" attribute in Server-Side Include Directive in virtual directory
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 14 Jul 2004 04:07:10 -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 ivan@chimerical.com.au.
http://bugzilla.ximian.com/show_bug.cgi?id=61524
--- shadow/61524 2004-07-14 04:07:10.000000000 -0400
+++ shadow/61524.tmp.29644 2004-07-14 04:07:10.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 61524
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ivan@chimerical.com.au
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: AspGenerator - 404 error using "File" attribute in Server-Side Include Directive in virtual directory
+
+Description of Problem:
+Using the "File" attribute in a Server-Side Include Directive will not
+find the include file to be included.
+
+Steps to reproduce the problem:
+1. Create an ASPX with <!-- #include file="myfile.inc" --> in virtual (or
+application) directory
+2. View via web
+
+Actual Results:
+Page gives a misleading 404 error, saying it can't file the REQUESTED
+file. Not the INCLUDE file.
+
+Expected Results:
+Inclusion of include file into application.
+
+How often does this happen?
+Always.
+
+Possible Work-around:
+Always use "Virtual" attribute in server side includes.
+
+Too dense to think too much patch:
+Index: AspGenerator.cs
+===================================================================
+RCS
+file: /mono/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs,v
+retrieving revision 1.54
+diff -u -r1.54 AspGenerator.cs
+--- AspGenerator.cs 24 Jun 2004 20:58:16 -0000 1.54
++++ AspGenerator.cs 14 Jul 2004 07:46:22 -0000
+@@ -320,7 +320,7 @@
+ if (isvirtual) {
+ file = tparser.MapPath (file);
+ } else if (!Path.IsPathRooted (file)) {
+- file = UrlUtils.Combine
+(tparser.BaseVirtualDir, file);
++ file = UrlUtils.Combine
+(tparser.BaseDir, file);
+ }
+
+ InitParser (file);