[Mono-bugs] [Bug 81274][Wis] New - Problems with Culture set to "auto" in ASP.NET pages

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Mar 30 12:12:10 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 johan.skold at gmail.com.

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

--- shadow/81274	2007-03-30 11:12:10.000000000 -0500
+++ shadow/81274.tmp.6230	2007-03-30 11:12:10.000000000 -0500
@@ -0,0 +1,57 @@
+Bug#: 81274
+Product: Mono: Runtime
+Version: 1.0
+OS: GNU/Linux [Other]
+OS Details: Ubuntu Linux 7.04 Beta, server edition
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: johan.skold at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Problems with Culture set to "auto" in ASP.NET pages
+
+Description of Problem:
+Under mod_mono, when setting Culture and UICulture to "auto" in the page
+directive at the top of your page, you sometimes end up getting a
+System.NotSupportedException thrown, depending on how the browser sent the
+culture info.
+
+
+Steps to reproduce the problem:
+1. Create an ASP.NET page with Culture and UICulture set to "auto" in the
+Page directive. For example:
+<%@ Page Language="C#" Culture="auto" UICulture="auto" %>
+
+2. This step could be hard, but make your web-browser specify a culture
+*unknown* to Mono. For example, if you use firefox (note that the
+directives might be slightly off as I use a swedish version of firefox);
+Click "Tools" > "Settings...". Go to the "tab" labelled "Advanced" and
+close to the bottom there is a button labeled "Pick...". In that list, try
+adding "Swedish [sv]" for one example, and put it at the top of the list.
+
+3. Browse to the ASP.NET page you created.
+
+
+Actual Results:
+Error message 500 with stack trace: 
+System.NotSupportedException: Culture "sv" is a neutral culture. It can not
+be used in formatting and parsing and therefore cannot be set as the
+thread's current culture.
+  at System.Globalization.CultureInfo.CheckNeutral () [0x00000] 
+  at System.Threading.Thread.set_CurrentCulture
+(System.Globalization.CultureInfo value) [0x00000] 
+  at System.Web.UI.Page.set_Culture (System.String value) [0x00000] 
+  at _Default.FrameworkInitialize () [0x00000] 
+  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
+[0x00000] 
+  at System.Web.HttpApplication+<>c__CompilerGenerated3.MoveNext () [0x00000] 
+
+
+Expected Results:
+Swedish culture info in System.Threading.Thread.CurrentThread.CurrentCulture


More information about the mono-bugs mailing list