Culture is not supported
Asked Answered
C

3

12

I'm using Visual Studio 2012 Ultimate version.

I've got this error and I don't know how to solve it.

Culture is not supported. Parameter name: name en-UK is an invalid culture identifier.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Globalization.CultureNotFoundException: Culture is not supported. Parameter name: name en-UK is an invalid culture identifier.

please help me

Chewy answered 20/1, 2013 at 14:6 Comment(4)
[CultureNotFoundException: Culture is not supported. Parameter name: name en-UK is an invalid culture identifier.] System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) +202 System.Globalization.CultureInfo..ctor(String name) +6 ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in e:\Marcus Evans Documents\MarcusEvans.CMS\CMS.WebUI\Global.asax:142 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69Chewy
I have master page in my application, I initialed culture in Application_BeginRequest. am i in right way?Chewy
What part of the error message don't you understand?Hames
You really need to provide more information and context describing on how you got to the error when expecting answers from the community.Cecilacecile
L
26

You should try en-GB for English (United Kingdom)

List of Cultures

Lentamente answered 20/1, 2013 at 14:8 Comment(2)
Thanks Venson, let me try.Chewy
I really appreciate you Venson.Chewy
F
42

Go to Debug -> Options -> Debugging and tick "Enable Just My Code"

Frasco answered 23/9, 2013 at 3:24 Comment(5)
+1 I'm surprised this was downvoted without comment. It solved this problem for me.Raddy
Agreed. This suggestion fixed it for me.Finnie
This only hides the error, what actaully is the problem?Patellate
This is more ignoring the problem than solving it. If you need to debug into .net framework code for some reason (Unity...), you'll have to reactivate the setting and this exception will keep nagging you. It would be better to actually understand the root cause and solve the issue.Workwoman
Upgrading from Visual Studio 2017 15.4 and 15.5 somehow turned off "Just My Code' - this solved it for meAbattoir
L
26

You should try en-GB for English (United Kingdom)

List of Cultures

Lentamente answered 20/1, 2013 at 14:8 Comment(2)
Thanks Venson, let me try.Chewy
I really appreciate you Venson.Chewy
P
1

In my case with IIS Express, it was caused by its inability to write to C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files as IIS Express runs by a current user. So I've added permission to write to it for the current user to solve the error.

Parasang answered 16/7, 2018 at 16:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.