[Mono-bugs] [Bug 466059] New: Relative paths in App_GlobalResources/*.resx resolved relative to website root, not App_GlobalResources
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jan 14 10:47:51 EST 2009
https://bugzilla.novell.com/show_bug.cgi?id=466059
Summary: Relative paths in App_GlobalResources/*.resx resolved
relative to website root, not App_GlobalResources
Classification: Mono
Product: Mono: Class Libraries
Version: unspecified
Platform: Macintosh
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: william.shallum at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=265036)
--> (https://bugzilla.novell.com/attachment.cgi?id=265036)
test website
User-Agent: Opera/9.63 (Macintosh; Intel Mac OS X; U; en) Presto/2.1.1
In the App_GlobalResources/TestResource.resx file I have a reference to another
file (ResXFileRef). MS.NET resolves this reference relative to the .resx file
(or to App_GlobalResources, haven't tried with the standalone
ResXResourceReader). Mono resolves the reference relative to the website's root
directory.
Reproducible: Always
Steps to Reproduce:
1. Unzip the website from the zip file given
2. Start xsp2 in the website directory
3. Try to access index.aspx
Actual Results:
Error happens:
Could not find file "/private/tmp/t/testkey.data.txt".
System.IO.FileNotFoundException: Could not find file
"/private/tmp/t/testkey.data.txt".
File name: '/private/tmp/t/testkey.data.txt'
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions
options) [0x00000]
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess
access, FileShare share) [0x00000]
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor
(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
at System.IO.File.OpenRead (System.String path) [0x00000]
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding
encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000]
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding
encoding) [0x00000]
at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor
(string,System.Text.Encoding)
at System.Resources.ResXFileRef+Converter.ConvertFrom (ITypeDescriptorContext
context, System.Globalization.CultureInfo culture, System.Object value)
[0x00000]
at System.ComponentModel.TypeConverter.ConvertFromString
(ITypeDescriptorContext context, System.Globalization.CultureInfo culture,
System.String text) [0x00000]
at System.ComponentModel.TypeConverter.ConvertFromInvariantString
(ITypeDescriptorContext context, System.String text) [0x00000]
at System.ComponentModel.TypeConverter.ConvertFromInvariantString
(System.String text) [0x00000]
at System.Resources.ResXResourceReader.ParseDataNode (Boolean meta) [0x00000]
at System.Resources.ResXResourceReader.LoadData () [0x00000]
Expected Results:
Should display the text from the resource file
Probably caused by AppResourcesCompiler not setting the BasePath of the
ResXResourceReader. Should probably set the BasePath to the directory of the
resx file.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list