470,638 Members | 1,577 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,638 developers. It's quick & easy.

ASP.NET 2.0 Beta and Localization

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.
Nov 19 '05 #1
8 2413
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" <ol****************@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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.

Nov 19 '05 #2
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(Cult ureInfo culture) +2722547
System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992
System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext context,
MethodInfo method, Int32 paramCount, Object eventSource, EventArgs
eventArgs, HttpSessionState session) +187

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
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" <ol****************@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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.


Nov 19 '05 #3
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" <ol****************@online.nospam> wrote in message
news:OM****************@TK2MSFTNGP12.phx.gbl...
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(Cult ureInfo culture) +2722547
System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992
System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext context, MethodInfo
method, Int32 paramCount, Object eventSource, EventArgs eventArgs, HttpSessionState
session) +187

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
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" <ol****************@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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.



Nov 19 '05 #4
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" <no***********@nowhere.com> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
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" <ol****************@online.nospam> wrote in message
news:OM****************@TK2MSFTNGP12.phx.gbl...
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(Cult ureInfo culture)
+2722547
System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992
System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext context,
MethodInfo method, Int32 paramCount, Object eventSource, EventArgs
eventArgs, HttpSessionState session) +187

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
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" <ol****************@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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.



Nov 19 '05 #5
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" <ol****************@online.nospam> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
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" <no***********@nowhere.com> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
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" <ol****************@online.nospam> wrote in message
news:OM****************@TK2MSFTNGP12.phx.gbl...
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(Cult ureInfo culture) +2722547
System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992
System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext context, MethodInfo
method, Int32 paramCount, Object eventSource, EventArgs eventArgs, HttpSessionState
session) +187

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
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" <ol****************@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
>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.



Nov 19 '05 #6
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" <no***********@nowhere.com>
| References: <#1**************@TK2MSFTNGP12.phx.gbl>
<O4**************@TK2MSFTNGP12.phx.gbl>
<OM**************@TK2MSFTNGP12.phx.gbl>
<#y**************@TK2MSFTNGP15.phx.gbl>
<eR**************@TK2MSFTNGP10.phx.gbl>
| 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: <Ok**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 222stb33.codetel.net.do 64.32.114.222
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.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" <ol****************@online.nospam> wrote in message
| news:eR**************@TK2MSFTNGP10.phx.gbl...
| > 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" <no***********@nowhere.com> wrote in message
| > news:%2******************@TK2MSFTNGP15.phx.gbl...
| >> 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" <ol****************@online.nospam> wrote in message
| >> news:OM****************@TK2MSFTNGP12.phx.gbl...
| >>> 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(Cult ureInfo culture)
+2722547
| >>> System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
| >>> System.Web.HttpApplication.SetCulture(Boolean useAppCulture)
+3438992
| >>> System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext
context, MethodInfo
| >>> method, Int32 paramCount, Object eventSource, EventArgs eventArgs,
HttpSessionState
| >>> session) +187
| >>>
| >>>
| >>>
| >>>
| >>>
| >>> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
| >>> news:O4**************@TK2MSFTNGP12.phx.gbl...
| >>>> 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" <ol****************@online.nospam> wrote in message
| >>>> news:%2****************@TK2MSFTNGP12.phx.gbl...
| >>>>>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.
| >>>>
| >>>>
| >>>
| >>>
| >>
| >>
| >
| >
|
|
|

Nov 19 '05 #7
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]" <st*****@online.microsoft.com> wrote in message
news:8g*************@TK2MSFTNGXA01.phx.gbl...
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" <no***********@nowhere.com>
| References: <#1**************@TK2MSFTNGP12.phx.gbl>
<O4**************@TK2MSFTNGP12.phx.gbl>
<OM**************@TK2MSFTNGP12.phx.gbl>
<#y**************@TK2MSFTNGP15.phx.gbl>
<eR**************@TK2MSFTNGP10.phx.gbl>
| 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: <Ok**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 222stb33.codetel.net.do 64.32.114.222
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.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" <ol****************@online.nospam> wrote in message
| news:eR**************@TK2MSFTNGP10.phx.gbl...
| > 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" <no***********@nowhere.com> wrote in message
| > news:%2******************@TK2MSFTNGP15.phx.gbl...
| >> 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" <ol****************@online.nospam> wrote in message
| >> news:OM****************@TK2MSFTNGP12.phx.gbl...
| >>> 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(Cult ureInfo culture)
+2722547
| >>> System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
| >>> System.Web.HttpApplication.SetCulture(Boolean useAppCulture)
+3438992
| >>> System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext
context, MethodInfo
| >>> method, Int32 paramCount, Object eventSource, EventArgs eventArgs,
HttpSessionState
| >>> session) +187
| >>>
| >>>
| >>>
| >>>
| >>>
| >>> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
| >>> news:O4**************@TK2MSFTNGP12.phx.gbl...
| >>>> 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" <ol****************@online.nospam> wrote in
message
| >>>> news:%2****************@TK2MSFTNGP12.phx.gbl...
| >>>>>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.
| >>>>
| >>>>
| >>>
| >>>
| >>
| >>
| >
| >
|
|
|

Nov 19 '05 #8
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" <ol****************@online.nospam>
| References: <#1**************@TK2MSFTNGP12.phx.gbl>
<O4**************@TK2MSFTNGP12.phx.gbl>
<OM**************@TK2MSFTNGP12.phx.gbl>
<#y**************@TK2MSFTNGP15.phx.gbl>
<eR**************@TK2MSFTNGP10.phx.gbl>
<Ok**************@TK2MSFTNGP09.phx.gbl>
<8g*************@TK2MSFTNGXA01.phx.gbl>
| 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: <#s**************@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: reverse.completel.net 213.30.138.178
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.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]" <st*****@online.microsoft.com> wrote in message
| news:8g*************@TK2MSFTNGXA01.phx.gbl...
| > 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" <no***********@nowhere.com>
| > | References: <#1**************@TK2MSFTNGP12.phx.gbl>
| > <O4**************@TK2MSFTNGP12.phx.gbl>
| > <OM**************@TK2MSFTNGP12.phx.gbl>
| > <#y**************@TK2MSFTNGP15.phx.gbl>
| > <eR**************@TK2MSFTNGP10.phx.gbl>
| > | 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: <Ok**************@TK2MSFTNGP09.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: 222stb33.codetel.net.do 64.32.114.222
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.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" <ol****************@online.nospam> wrote in message
| > | news:eR**************@TK2MSFTNGP10.phx.gbl...
| > | > 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" <no***********@nowhere.com> wrote in message
| > | > news:%2******************@TK2MSFTNGP15.phx.gbl...
| > | >> 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" <ol****************@online.nospam> wrote in
message
| > | >> news:OM****************@TK2MSFTNGP12.phx.gbl...
| > | >>> 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(Cult ureInfo culture)
| > +2722547
| > | >>> System.Threading.Thread.set_CurrentCulture(Culture Info value)
+42
| > | >>> System.Web.HttpApplication.SetCulture(Boolean useAppCulture)
| > +3438992
| > | >>> System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext
| > context, MethodInfo
| > | >>> method, Int32 paramCount, Object eventSource, EventArgs eventArgs,
| > HttpSessionState
| > | >>> session) +187
| > | >>>
| > | >>>
| > | >>>
| > | >>>
| > | >>>
| > | >>> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
| > | >>> news:O4**************@TK2MSFTNGP12.phx.gbl...
| > | >>>> 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" <ol****************@online.nospam> wrote in
| > message
| > | >>>> news:%2****************@TK2MSFTNGP12.phx.gbl...
| > | >>>>>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.
| > | >>>>
| > | >>>>
| > | >>>
| > | >>>
| > | >>
| > | >>
| > | >
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Amin Schoeib | last post: by
6 posts views Thread by Rental | last post: by
5 posts views Thread by CMM | last post: by
2 posts views Thread by bruno | last post: by
reply views Thread by shapper | last post: by
3 posts views Thread by Corey B | last post: by
3 posts views Thread by Computer Guru | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.