http://bugzilla.novell.com/show_bug.cgi?id=545578


           Summary: appSettings file attribute should be interpreted
                    relative to the containing file
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Configuration
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

The MonoInternalNote in
mcs/class/System.Configuration/System.Configuration/AppSettingsSection.cs
indicates some uncertainty about this and related implementation details, but
http://msdn.microsoft.com/en-us/library/ms228154%28VS.80%29.aspx#attributesandElementsToggle
is pretty clear that the file attribute specifies a path relative to "the local
configuration file."

Right now, AppSettingsSection just passes the file attribute value to
System.IO.File.OpenRead, with the consequence that xsp interprets the filename
relative to the directory in which it is started. It should interpret the
filename relative to the file in which it found the appSettings element (in
this case, Web.config).


Reproducible: Always

Steps to Reproduce:
1. mkdir demo
2. cd demo
3. emacs demo.aspx Web.config user.config
3.a. (demo.aspx)
   <%@ Page language="c#" inherits="System.Web.UI.Page" %>
   <%= System.Configuration.ConfigurationSettings.AppSettings["test"] %>
3.b. (Web.config)
   <?xml version="1.0" encoding="utf-8"?>
   <appSettings file="user.config">
   </appSettings>
3.c. (user.config)
   <?xml version="1.0" encoding="utf-8"?>
   <appSettings>
     <add key="test" value="it works" />
   </appSettings>
4. cd ..
5. xsp --applications /demo:demo
6. wget http://localhost:8080/demo/demo.aspx
Actual Results:  
blank page

Expected Results:  
"it works"

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to