| Home | Forums | Reviews | Articles | Register |
![]() |
| Thread Tools | Rate Thread |
|
|
|
| |
|
Juan T. Llibre
Guest
Posts: n/a
|
Try using "fr-FR" and "de-DE", if you're configuring culture and uiCulture.
If you're using resources, remember that they now go in the App_LocalResources directory. Juan T. Llibre ASP.NET MVP http://asp.net.do/foros/ Foros de ASP.NET en Espaņol Ven, y hablemos de ASP.NET... ====================== "Olivier Matrot" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)... >I encounter a problem with Localization features in ASP.NET 2.0. > Is seems that the framework is not able to manage neutral cultures such as 'fr', or > 'de'. Those are the culture sent by default from a french or German Internet Explorer in > France or Germany. > > There is a runtime error "System.NotSupportedException: Culture "fr" is a neutral > culture. It can not be used in formatting and parsing and therefore cannot be set as the > thread's current culture." > > However, this happens only the first time a page in the site is accessed. Other hits are > processed correctly... > > TIA. |
|
||
|
||||
|
Olivier Matrot
Guest
Posts: n/a
|
In ASP.NET 2.0 the thread culture is automatically set to the culture
request found in the headers sent by Internet Explorer. I'm pretty sure that this will be corrected in the final release, but in the meantime, I must found a solution to this particular problem. Anyway, Internet Explorer has no way to specify 'fr-FR' in the language preferences, and I do not want my customers to make such a change because of a restriction in the current Framework release. Firefox have the language 'fr-FR' available. Here is the call stack : System.Globalization.CultureInfo.CheckNeutral(CultureInfo culture) +2722547 System.Threading.Thread.set_CurrentCulture(CultureInfo value) +42 System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992 System.Web.HttpApplication.ProcessSpecialRequest(HttpContext context, MethodInfo method, Int32 paramCount, Object eventSource, EventArgs eventArgs, HttpSessionState session) +187 "Juan T. Llibre" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)... > Try using "fr-FR" and "de-DE", if you're configuring culture and > uiCulture. > > If you're using resources, remember that they now go > in the App_LocalResources directory. > > > > Juan T. Llibre > ASP.NET MVP > http://asp.net.do/foros/ > Foros de ASP.NET en Espaņol > Ven, y hablemos de ASP.NET... > ====================== > > "Olivier Matrot" <(E-Mail Removed)> wrote in message > news:%(E-Mail Removed)... >>I encounter a problem with Localization features in ASP.NET 2.0. >> Is seems that the framework is not able to manage neutral cultures such >> as 'fr', or 'de'. Those are the culture sent by default from a french or >> German Internet Explorer in France or Germany. >> >> There is a runtime error "System.NotSupportedException: Culture "fr" is a >> neutral culture. It can not be used in formatting and parsing and >> therefore cannot be set as the thread's current culture." >> >> However, this happens only the first time a page in the site is accessed. >> Other hits are processed correctly... >> >> TIA. > > |
|
||
|
||||
|
Juan T. Llibre
Guest
Posts: n/a
|
That is not a "problem" nor a "restriction"
and there's nothing to fix. It's a feature. You have a number of misconceptions which would be too extensive to deal with in a short post. Please review this : http://beta.asp.net/QUICKSTART/aspne...spx#ielanguage In ASP.NET 2.0, setting your Page culture to : <%@ Page Culture="auto:fr-FR" %> should fix your problem. Juan T. Llibre ASP.NET MVP http://asp.net.do/foros/ Foros de ASP.NET en Espaņol Ven, y hablemos de ASP.NET... ====================== "Olivier Matrot" <(E-Mail Removed)> wrote in message news:OM%23$(E-Mail Removed)... > In ASP.NET 2.0 the thread culture is automatically set to the culture request found in > the headers sent by Internet Explorer. > I'm pretty sure that this will be corrected in the final release, but in the meantime, I > must found a solution to this particular problem. > > Anyway, Internet Explorer has no way to specify 'fr-FR' in the language preferences, and > I do not want my customers to make such a change because of a restriction in the current > Framework release. Firefox have the language 'fr-FR' available. > > Here is the call stack : > System.Globalization.CultureInfo.CheckNeutral(CultureInfo culture) +2722547 > System.Threading.Thread.set_CurrentCulture(CultureInfo value) +42 > System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992 > System.Web.HttpApplication.ProcessSpecialRequest(HttpContext context, MethodInfo > method, Int32 paramCount, Object eventSource, EventArgs eventArgs, HttpSessionState > session) +187 > > > > > > "Juan T. Llibre" <(E-Mail Removed)> wrote in message > news:(E-Mail Removed)... >> Try using "fr-FR" and "de-DE", if you're configuring culture and uiCulture. >> >> If you're using resources, remember that they now go >> in the App_LocalResources directory. >> >> >> >> Juan T. Llibre >> ASP.NET MVP >> http://asp.net.do/foros/ >> Foros de ASP.NET en Espaņol >> Ven, y hablemos de ASP.NET... >> ====================== >> >> "Olivier Matrot" <(E-Mail Removed)> wrote in message >> news:%(E-Mail Removed)... >>>I encounter a problem with Localization features in ASP.NET 2.0. >>> Is seems that the framework is not able to manage neutral cultures such as 'fr', or >>> 'de'. Those are the culture sent by default from a french or German Internet Explorer >>> in France or Germany. >>> >>> There is a runtime error "System.NotSupportedException: Culture "fr" is a neutral >>> culture. It can not be used in formatting and parsing and therefore cannot be set as >>> the thread's current culture." >>> >>> However, this happens only the first time a page in the site is accessed. Other hits >>> are processed correctly... >>> >>> TIA. >> >> > > |
|
||
|
||||
|
Olivier Matrot
Guest
Posts: n/a
|
I've modified all my pages as you suggested.
The problem is not fixed. I forgot to say that the exception is thrown before any of the function available in Global.asax.cs are reached. "Juan T. Llibre" <(E-Mail Removed)> wrote in message news:%23y%(E-Mail Removed)... > That is not a "problem" nor a "restriction" > and there's nothing to fix. It's a feature. > > You have a number of misconceptions which > would be too extensive to deal with in a short post. > > Please review this : > http://beta.asp.net/QUICKSTART/aspne...spx#ielanguage > > In ASP.NET 2.0, setting your Page culture to : > > <%@ Page Culture="auto:fr-FR" %> > > should fix your problem. > > > > Juan T. Llibre > ASP.NET MVP > http://asp.net.do/foros/ > Foros de ASP.NET en Espaņol > Ven, y hablemos de ASP.NET... > ====================== > > "Olivier Matrot" <(E-Mail Removed)> wrote in message > news:OM%23$(E-Mail Removed)... >> In ASP.NET 2.0 the thread culture is automatically set to the culture >> request found in the headers sent by Internet Explorer. >> I'm pretty sure that this will be corrected in the final release, but in >> the meantime, I must found a solution to this particular problem. >> >> Anyway, Internet Explorer has no way to specify 'fr-FR' in the language >> preferences, and I do not want my customers to make such a change because >> of a restriction in the current Framework release. Firefox have the >> language 'fr-FR' available. >> >> Here is the call stack : >> System.Globalization.CultureInfo.CheckNeutral(CultureInfo culture) >> +2722547 >> System.Threading.Thread.set_CurrentCulture(CultureInfo value) +42 >> System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992 >> System.Web.HttpApplication.ProcessSpecialRequest(HttpContext context, >> MethodInfo method, Int32 paramCount, Object eventSource, EventArgs >> eventArgs, HttpSessionState session) +187 >> >> >> >> >> >> "Juan T. Llibre" <(E-Mail Removed)> wrote in message >> news:(E-Mail Removed)... >>> Try using "fr-FR" and "de-DE", if you're configuring culture and >>> uiCulture. >>> >>> If you're using resources, remember that they now go >>> in the App_LocalResources directory. >>> >>> >>> >>> Juan T. Llibre >>> ASP.NET MVP >>> http://asp.net.do/foros/ >>> Foros de ASP.NET en Espaņol >>> Ven, y hablemos de ASP.NET... >>> ====================== >>> >>> "Olivier Matrot" <(E-Mail Removed)> wrote in message >>> news:%(E-Mail Removed)... >>>>I encounter a problem with Localization features in ASP.NET 2.0. >>>> Is seems that the framework is not able to manage neutral cultures such >>>> as 'fr', or 'de'. Those are the culture sent by default from a french >>>> or German Internet Explorer in France or Germany. >>>> >>>> There is a runtime error "System.NotSupportedException: Culture "fr" is >>>> a neutral culture. It can not be used in formatting and parsing and >>>> therefore cannot be set as the thread's current culture." >>>> >>>> However, this happens only the first time a page in the site is >>>> accessed. Other hits are processed correctly... >>>> >>>> TIA. >>> >>> >> >> > > |
|
||
|
||||
|
Juan T. Llibre
Guest
Posts: n/a
|
Very strange, indeed.
Have you considered bugging the behavior at http://lab.msdn.microsoft.com/productfeedback/ ? You'll need a Passport account to file a bug there. Thanks ! Juan T. Llibre ASP.NET MVP http://asp.net.do/foros/ Foros de ASP.NET en Espaņol Ven, y hablemos de ASP.NET... ====================== "Olivier Matrot" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)... > I've modified all my pages as you suggested. > The problem is not fixed. > > I forgot to say that the exception is thrown before any of the function available in > Global.asax.cs are reached. > > "Juan T. Llibre" <(E-Mail Removed)> wrote in message > news:%23y%(E-Mail Removed)... >> That is not a "problem" nor a "restriction" >> and there's nothing to fix. It's a feature. >> >> You have a number of misconceptions which >> would be too extensive to deal with in a short post. >> >> Please review this : >> http://beta.asp.net/QUICKSTART/aspne...spx#ielanguage >> >> In ASP.NET 2.0, setting your Page culture to : >> >> <%@ Page Culture="auto:fr-FR" %> >> >> should fix your problem. >> >> >> >> Juan T. Llibre >> ASP.NET MVP >> http://asp.net.do/foros/ >> Foros de ASP.NET en Espaņol >> Ven, y hablemos de ASP.NET... >> ====================== >> >> "Olivier Matrot" <(E-Mail Removed)> wrote in message >> news:OM%23$(E-Mail Removed)... >>> In ASP.NET 2.0 the thread culture is automatically set to the culture request found in >>> the headers sent by Internet Explorer. >>> I'm pretty sure that this will be corrected in the final release, but in the meantime, >>> I must found a solution to this particular problem. >>> >>> Anyway, Internet Explorer has no way to specify 'fr-FR' in the language preferences, >>> and I do not want my customers to make such a change because of a restriction in the >>> current Framework release. Firefox have the language 'fr-FR' available. >>> >>> Here is the call stack : >>> System.Globalization.CultureInfo.CheckNeutral(CultureInfo culture) +2722547 >>> System.Threading.Thread.set_CurrentCulture(CultureInfo value) +42 >>> System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992 >>> System.Web.HttpApplication.ProcessSpecialRequest(HttpContext context, MethodInfo >>> method, Int32 paramCount, Object eventSource, EventArgs eventArgs, HttpSessionState >>> session) +187 >>> >>> >>> >>> >>> >>> "Juan T. Llibre" <(E-Mail Removed)> wrote in message >>> news:(E-Mail Removed)... >>>> Try using "fr-FR" and "de-DE", if you're configuring culture and uiCulture. >>>> >>>> If you're using resources, remember that they now go >>>> in the App_LocalResources directory. >>>> >>>> >>>> >>>> Juan T. Llibre >>>> ASP.NET MVP >>>> http://asp.net.do/foros/ >>>> Foros de ASP.NET en Espaņol >>>> Ven, y hablemos de ASP.NET... >>>> ====================== >>>> >>>> "Olivier Matrot" <(E-Mail Removed)> wrote in message >>>> news:%(E-Mail Removed)... >>>>>I encounter a problem with Localization features in ASP.NET 2.0. >>>>> Is seems that the framework is not able to manage neutral cultures such as 'fr', or >>>>> 'de'. Those are the culture sent by default from a french or German Internet >>>>> Explorer in France or Germany. >>>>> >>>>> There is a runtime error "System.NotSupportedException: Culture "fr" is a neutral >>>>> culture. It can not be used in formatting and parsing and therefore cannot be set as >>>>> the thread's current culture." >>>>> >>>>> However, this happens only the first time a page in the site is accessed. Other hits >>>>> are processed correctly... >>>>> >>>>> TIA. >>>> >>>> >>> >>> >> >> > > |
|
||
|
||||
|
Steven Cheng[MSFT]
Guest
Posts: n/a
|
Hi Olivier,
I've just performed the test on my local ASP.NET 2.0 beta2 environment, seems I'm not able to repro the behavior when using a english version's IE(set the default browser language to fr ). As you also mentioned that the exception happens at the intial request to the website and before event in Global.asax get fired, I'm wondering that it's a parsing error occur during the dynamica compilation stage. Have you checked your global resource or any other global component (which will be compiled at initial time) to see whether you've set any neutral culture as the "Culture" attribute? Anyway, what make me strange is that the runtime should always convert neutral culture to specific culture internally. So if you did be able to repro the problem on the latest beta2 or CTP, I suggest you try submitting a fix request as Juan has mentioned. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | From: "Juan T. Llibre" <(E-Mail Removed)> | References: <#(E-Mail Removed)> <(E-Mail Removed)> <OM#$(E-Mail Removed)> <#y#(E-Mail Removed)> <(E-Mail Removed)> | Subject: Re: ASP.NET 2.0 Beta and Localization | Date: Tue, 16 Aug 2005 12:15:50 -0400 | Lines: 117 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830 | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830 | X-RFC2646: Format=Flowed; Response | Message-ID: <(E-Mail Removed)> | Newsgroups: microsoft.public.dotnet.framework.aspnet | NNTP-Posting-Host: 222stb33.codetel.net.do 64.32.114.222 | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.aspnet:118329 | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | Very strange, indeed. | | Have you considered bugging the behavior at | http://lab.msdn.microsoft.com/productfeedback/ ? | | You'll need a Passport account to file a bug there. | | Thanks ! | | | | | Juan T. Llibre | ASP.NET MVP | http://asp.net.do/foros/ | Foros de ASP.NET en Espaņol | Ven, y hablemos de ASP.NET... | ====================== | | "Olivier Matrot" <(E-Mail Removed)> wrote in message | news:(E-Mail Removed)... | > I've modified all my pages as you suggested. | > The problem is not fixed. | > | > I forgot to say that the exception is thrown before any of the function available in | > Global.asax.cs are reached. | > | > "Juan T. Llibre" <(E-Mail Removed)> wrote in message | > news:%23y%(E-Mail Removed)... | >> That is not a "problem" nor a "restriction" | >> and there's nothing to fix. It's a feature. | >> | >> You have a number of misconceptions which | >> would be too extensive to deal with in a short post. | >> | >> Please review this : | >> http://beta.asp.net/QUICKSTART/aspne....aspx#ielangua ge | >> | >> In ASP.NET 2.0, setting your Page culture to : | >> | >> <%@ Page Culture="auto:fr-FR" %> | >> | >> should fix your problem. | >> | >> | >> | >> Juan T. Llibre | >> ASP.NET MVP | >> http://asp.net.do/foros/ | >> Foros de ASP.NET en Espaņol | >> Ven, y hablemos de ASP.NET... | >> ====================== | >> | >> "Olivier Matrot" <(E-Mail Removed)> wrote in message | >> news:OM%23$(E-Mail Removed)... | >>> In ASP.NET 2.0 the thread culture is automatically set to the culture request found in | >>> the headers sent by Internet Explorer. | >>> I'm pretty sure that this will be corrected in the final release, but in the meantime, | >>> I must found a solution to this particular problem. | >>> | >>> Anyway, Internet Explorer has no way to specify 'fr-FR' in the language preferences, | >>> and I do not want my customers to make such a change because of a restriction in the | >>> current Framework release. Firefox have the language 'fr-FR' available. | >>> | >>> Here is the call stack : | >>> System.Globalization.CultureInfo.CheckNeutral(CultureInfo culture) +2722547 | >>> System.Threading.Thread.set_CurrentCulture(CultureInfo value) +42 | >>> System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992 | >>> System.Web.HttpApplication.ProcessSpecialRequest(HttpContext context, MethodInfo | >>> method, Int32 paramCount, Object eventSource, EventArgs eventArgs, HttpSessionState | >>> session) +187 | >>> | >>> | >>> | >>> | >>> | >>> "Juan T. Llibre" <(E-Mail Removed)> wrote in message | >>> news:(E-Mail Removed)... | >>>> Try using "fr-FR" and "de-DE", if you're configuring culture and uiCulture. | >>>> | >>>> If you're using resources, remember that they now go | >>>> in the App_LocalResources directory. | >>>> | >>>> | >>>> | >>>> Juan T. Llibre | >>>> ASP.NET MVP | >>>> http://asp.net.do/foros/ | >>>> Foros de ASP.NET en Espaņol | >>>> Ven, y hablemos de ASP.NET... | >>>> ====================== | >>>> | >>>> "Olivier Matrot" <(E-Mail Removed)> wrote in message | >>>> news:%(E-Mail Removed)... | >>>>>I encounter a problem with Localization features in ASP.NET 2.0. | >>>>> Is seems that the framework is not able to manage neutral cultures such as 'fr', or | >>>>> 'de'. Those are the culture sent by default from a french or German Internet | >>>>> Explorer in France or Germany. | >>>>> | >>>>> There is a runtime error "System.NotSupportedException: Culture "fr" is a neutral | >>>>> culture. It can not be used in formatting and parsing and therefore cannot be set as | >>>>> the thread's current culture." | >>>>> | >>>>> However, this happens only the first time a page in the site is accessed. Other hits | >>>>> are processed correctly... | >>>>> | >>>>> TIA. | >>>> | >>>> | >>> | >>> | >> | >> | > | > | | | |
|
||
|
||||
|
Olivier Matrot
Guest
Posts: n/a
|
Found the problem.
The Globalization section in web.config has culture and uiCulture set to "auto". Switching to "fr-FR" solved the problem. "Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)... > Hi Olivier, > > I've just performed the test on my local ASP.NET 2.0 beta2 environment, > seems I'm not able to repro the behavior when using a english version's > IE(set the default browser language to fr ). As you also mentioned that > the exception happens at the intial request to the website and before > event > in Global.asax get fired, I'm wondering that it's a parsing error occur > during the dynamica compilation stage. Have you checked your global > resource or any other global component (which will be compiled at initial > time) to see whether you've set any neutral culture as the "Culture" > attribute? Anyway, what make me strange is that the runtime should > always > convert neutral culture to specific culture internally. So if you did be > able to repro the problem on the latest beta2 or CTP, I suggest you try > submitting a fix request as Juan has mentioned. > > Thanks, > > Steven Cheng > Microsoft Online Support > > Get Secure! www.microsoft.com/security > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > > > > > > > > -------------------- > | From: "Juan T. Llibre" <(E-Mail Removed)> > | References: <#(E-Mail Removed)> > <(E-Mail Removed)> > <OM#$(E-Mail Removed)> > <#y#(E-Mail Removed)> > <(E-Mail Removed)> > | Subject: Re: ASP.NET 2.0 Beta and Localization > | Date: Tue, 16 Aug 2005 12:15:50 -0400 > | Lines: 117 > | X-Priority: 3 > | X-MSMail-Priority: Normal > | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830 > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830 > | X-RFC2646: Format=Flowed; Response > | Message-ID: <(E-Mail Removed)> > | Newsgroups: microsoft.public.dotnet.framework.aspnet > | NNTP-Posting-Host: 222stb33.codetel.net.do 64.32.114.222 > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl > | Xref: TK2MSFTNGXA01.phx.gbl > microsoft.public.dotnet.framework.aspnet:118329 > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet > | > | Very strange, indeed. > | > | Have you considered bugging the behavior at > | http://lab.msdn.microsoft.com/productfeedback/ ? > | > | You'll need a Passport account to file a bug there. > | > | Thanks ! > | > | > | > | > | Juan T. Llibre > | ASP.NET MVP > | http://asp.net.do/foros/ > | Foros de ASP.NET en Espaņol > | Ven, y hablemos de ASP.NET... > | ====================== > | > | "Olivier Matrot" <(E-Mail Removed)> wrote in message > | news:(E-Mail Removed)... > | > I've modified all my pages as you suggested. > | > The problem is not fixed. > | > > | > I forgot to say that the exception is thrown before any of the > function > available in > | > Global.asax.cs are reached. > | > > | > "Juan T. Llibre" <(E-Mail Removed)> wrote in message > | > news:%23y%(E-Mail Removed)... > | >> That is not a "problem" nor a "restriction" > | >> and there's nothing to fix. It's a feature. > | >> > | >> You have a number of misconceptions which > | >> would be too extensive to deal with in a short post. > | >> > | >> Please review this : > | >> > http://beta.asp.net/QUICKSTART/aspne....aspx#ielangua > ge > | >> > | >> In ASP.NET 2.0, setting your Page culture to : > | >> > | >> <%@ Page Culture="auto:fr-FR" %> > | >> > | >> should fix your problem. > | >> > | >> > | >> > | >> Juan T. Llibre > | >> ASP.NET MVP > | >> http://asp.net.do/foros/ > | >> Foros de ASP.NET en Espaņol > | >> Ven, y hablemos de ASP.NET... > | >> ====================== > | >> > | >> "Olivier Matrot" <(E-Mail Removed)> wrote in message > | >> news:OM%23$(E-Mail Removed)... > | >>> In ASP.NET 2.0 the thread culture is automatically set to the > culture > request found in > | >>> the headers sent by Internet Explorer. > | >>> I'm pretty sure that this will be corrected in the final release, > but > in the meantime, > | >>> I must found a solution to this particular problem. > | >>> > | >>> Anyway, Internet Explorer has no way to specify 'fr-FR' in the > language preferences, > | >>> and I do not want my customers to make such a change because of a > restriction in the > | >>> current Framework release. Firefox have the language 'fr-FR' > available. > | >>> > | >>> Here is the call stack : > | >>> System.Globalization.CultureInfo.CheckNeutral(CultureInfo culture) > +2722547 > | >>> System.Threading.Thread.set_CurrentCulture(CultureInfo value) +42 > | >>> System.Web.HttpApplication.SetCulture(Boolean useAppCulture) > +3438992 > | >>> System.Web.HttpApplication.ProcessSpecialRequest(HttpContext > context, MethodInfo > | >>> method, Int32 paramCount, Object eventSource, EventArgs eventArgs, > HttpSessionState > | >>> session) +187 > | >>> > | >>> > | >>> > | >>> > | >>> > | >>> "Juan T. Llibre" <(E-Mail Removed)> wrote in message > | >>> news:(E-Mail Removed)... > | >>>> Try using "fr-FR" and "de-DE", if you're configuring culture and > uiCulture. > | >>>> > | >>>> If you're using resources, remember that they now go > | >>>> in the App_LocalResources directory. > | >>>> > | >>>> > | >>>> > | >>>> Juan T. Llibre > | >>>> ASP.NET MVP > | >>>> http://asp.net.do/foros/ > | >>>> Foros de ASP.NET en Espaņol > | >>>> Ven, y hablemos de ASP.NET... > | >>>> ====================== > | >>>> > | >>>> "Olivier Matrot" <(E-Mail Removed)> wrote in > message > | >>>> news:%(E-Mail Removed)... > | >>>>>I encounter a problem with Localization features in ASP.NET 2.0. > | >>>>> Is seems that the framework is not able to manage neutral cultures > such as 'fr', or > | >>>>> 'de'. Those are the culture sent by default from a french or > German > Internet > | >>>>> Explorer in France or Germany. > | >>>>> > | >>>>> There is a runtime error "System.NotSupportedException: Culture > "fr" is a neutral > | >>>>> culture. It can not be used in formatting and parsing and > therefore > cannot be set as > | >>>>> the thread's current culture." > | >>>>> > | >>>>> However, this happens only the first time a page in the site is > accessed. Other hits > | >>>>> are processed correctly... > | >>>>> > | >>>>> TIA. > | >>>> > | >>>> > | >>> > | >>> > | >> > | >> > | > > | > > | > | > | > |
|
||
|
||||
|
Steven Cheng[MSFT]
Guest
Posts: n/a
|
Glad that you've found the cause Olivier,
If there're any further things or questions we can help, please always feel free to post here. Thanks & Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | From: "Olivier Matrot" <(E-Mail Removed)> | References: <#(E-Mail Removed)> <(E-Mail Removed)> <OM#$(E-Mail Removed)> <#y#(E-Mail Removed)> <(E-Mail Removed)> <(E-Mail Removed)> <(E-Mail Removed)> | Subject: Re: ASP.NET 2.0 Beta and Localization | Date: Wed, 17 Aug 2005 09:50:43 +0200 | Lines: 207 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 | X-RFC2646: Format=Flowed; Original | Message-ID: <#(E-Mail Removed)> | Newsgroups: microsoft.public.dotnet.framework.aspnet | NNTP-Posting-Host: reverse.completel.net 213.30.138.178 | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.aspnet:118508 | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | Found the problem. | The Globalization section in web.config has culture and uiCulture set to | "auto". Switching to "fr-FR" solved the problem. | | | "Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message | news:(E-Mail Removed)... | > Hi Olivier, | > | > I've just performed the test on my local ASP.NET 2.0 beta2 environment, | > seems I'm not able to repro the behavior when using a english version's | > IE(set the default browser language to fr ). As you also mentioned that | > the exception happens at the intial request to the website and before | > event | > in Global.asax get fired, I'm wondering that it's a parsing error occur | > during the dynamica compilation stage. Have you checked your global | > resource or any other global component (which will be compiled at initial | > time) to see whether you've set any neutral culture as the "Culture" | > attribute? Anyway, what make me strange is that the runtime should | > always | > convert neutral culture to specific culture internally. So if you did be | > able to repro the problem on the latest beta2 or CTP, I suggest you try | > submitting a fix request as Juan has mentioned. | > | > Thanks, | > | > Steven Cheng | > Microsoft Online Support | > | > Get Secure! www.microsoft.com/security | > (This posting is provided "AS IS", with no warranties, and confers no | > rights.) | > | > | > | > | > | > | > | > -------------------- | > | From: "Juan T. Llibre" <(E-Mail Removed)> | > | References: <#(E-Mail Removed)> | > <(E-Mail Removed)> | > <OM#$(E-Mail Removed)> | > <#y#(E-Mail Removed)> | > <(E-Mail Removed)> | > | Subject: Re: ASP.NET 2.0 Beta and Localization | > | Date: Tue, 16 Aug 2005 12:15:50 -0400 | > | Lines: 117 | > | X-Priority: 3 | > | X-MSMail-Priority: Normal | > | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830 | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830 | > | X-RFC2646: Format=Flowed; Response | > | Message-ID: <(E-Mail Removed)> | > | Newsgroups: microsoft.public.dotnet.framework.aspnet | > | NNTP-Posting-Host: 222stb33.codetel.net.do 64.32.114.222 | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl | > | Xref: TK2MSFTNGXA01.phx.gbl | > microsoft.public.dotnet.framework.aspnet:118329 | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | > | | > | Very strange, indeed. | > | | > | Have you considered bugging the behavior at | > | http://lab.msdn.microsoft.com/productfeedback/ ? | > | | > | You'll need a Passport account to file a bug there. | > | | > | Thanks ! | > | | > | | > | | > | | > | Juan T. Llibre | > | ASP.NET MVP | > | http://asp.net.do/foros/ | > | Foros de ASP.NET en Espaņol | > | Ven, y hablemos de ASP.NET... | > | ====================== | > | | > | "Olivier Matrot" <(E-Mail Removed)> wrote in message | > | news:(E-Mail Removed)... | > | > I've modified all my pages as you suggested. | > | > The problem is not fixed. | > | > | > | > I forgot to say that the exception is thrown before any of the | > function | > available in | > | > Global.asax.cs are reached. | > | > | > | > "Juan T. Llibre" <(E-Mail Removed)> wrote in message | > | > news:%23y%(E-Mail Removed)... | > | >> That is not a "problem" nor a "restriction" | > | >> and there's nothing to fix. It's a feature. | > | >> | > | >> You have a number of misconceptions which | > | >> would be too extensive to deal with in a short post. | > | >> | > | >> Please review this : | > | >> | > http://beta.asp.net/QUICKSTART/aspne....aspx#ielangua | > ge | > | >> | > | >> In ASP.NET 2.0, setting your Page culture to : | > | >> | > | >> <%@ Page Culture="auto:fr-FR" %> | > | >> | > | >> should fix your problem. | > | >> | > | >> | > | >> | > | >> Juan T. Llibre | > | >> ASP.NET MVP | > | >> http://asp.net.do/foros/ | > | >> Foros de ASP.NET en Espaņol | > | >> Ven, y hablemos de ASP.NET... | > | >> ====================== | > | >> | > | >> "Olivier Matrot" <(E-Mail Removed)> wrote in message | > | >> news:OM%23$(E-Mail Removed)... | > | >>> In ASP.NET 2.0 the thread culture is automatically set to the | > culture | > request found in | > | >>> the headers sent by Internet Explorer. | > | >>> I'm pretty sure that this will be corrected in the final release, | > but | > in the meantime, | > | >>> I must found a solution to this particular problem. | > | >>> | > | >>> Anyway, Internet Explorer has no way to specify 'fr-FR' in the | > language preferences, | > | >>> and I do not want my customers to make such a change because of a | > restriction in the | > | >>> current Framework release. Firefox have the language 'fr-FR' | > available. | > | >>> | > | >>> Here is the call stack : | > | >>> System.Globalization.CultureInfo.CheckNeutral(CultureInfo culture) | > +2722547 | > | >>> System.Threading.Thread.set_CurrentCulture(CultureInfo value) +42 | > | >>> System.Web.HttpApplication.SetCulture(Boolean useAppCulture) | > +3438992 | > | >>> System.Web.HttpApplication.ProcessSpecialRequest(HttpContext | > context, MethodInfo | > | >>> method, Int32 paramCount, Object eventSource, EventArgs eventArgs, | > HttpSessionState | > | >>> session) +187 | > | >>> | > | >>> | > | >>> | > | >>> | > | >>> | > | >>> "Juan T. Llibre" <(E-Mail Removed)> wrote in message | > | >>> news:(E-Mail Removed)... | > | >>>> Try using "fr-FR" and "de-DE", if you're configuring culture and | > uiCulture. | > | >>>> | > | >>>> If you're using resources, remember that they now go | > | >>>> in the App_LocalResources directory. | > | >>>> | > | >>>> | > | >>>> | > | >>>> Juan T. Llibre | > | >>>> ASP.NET MVP | > | >>>> http://asp.net.do/foros/ | > | >>>> Foros de ASP.NET en Espaņol | > | >>>> Ven, y hablemos de ASP.NET... | > | >>>> ====================== | > | >>>> | > | >>>> "Olivier Matrot" <(E-Mail Removed)> wrote in | > message | > | >>>> news:%(E-Mail Removed)... | > | >>>>>I encounter a problem with Localization features in ASP.NET 2.0. | > | >>>>> Is seems that the framework is not able to manage neutral cultures | > such as 'fr', or | > | >>>>> 'de'. Those are the culture sent by default from a french or | > German | > Internet | > | >>>>> Explorer in France or Germany. | > | >>>>> | > | >>>>> There is a runtime error "System.NotSupportedException: Culture | > "fr" is a neutral | > | >>>>> culture. It can not be used in formatting and parsing and | > therefore | > cannot be set as | > | >>>>> the thread's current culture." | > | >>>>> | > | >>>>> However, this happens only the first time a page in the site is | > accessed. Other hits | > | >>>>> are processed correctly... | > | >>>>> | > | >>>>> TIA. | > | >>>> | > | >>>> | > | >>> | > | >>> | > | >> | > | >> | > | > | > | > | > | | > | | > | | > | | | |
|
||
|
||||
|
|
|
| |
![]() |
| Thread Tools | |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| localization - disabling the localization of control properties? | Sergei Shelukhin | Microsoft Dot NET Framework Forms | 1 | 25th Oct 2007 11:52 PM |
| localization | raju | Microsoft Dot NET Compact Framework | 1 | 11th Sep 2006 05:31 PM |
| Localization | Bruno Alexandre | Microsoft ASP .NET | 1 | 27th Mar 2006 05:12 PM |
| ADO.NET and Localization | Reny J Joseph Thuthikattu | Microsoft ADO .NET | 0 | 11th May 2004 06:38 AM |
| localization | jagdish | Microsoft Dot NET Framework | 0 | 25th Aug 2003 01:44 PM |
Powered by vBulletin®. Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2010, Crawlability, Inc. |




