11

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

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Ramtin
  • 213
  • 1
  • 2
  • 7
  • [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) +69 – Ramtin Jan 20 '13 at 14:08
  • I have master page in my application, I initialed culture in Application_BeginRequest. am i in right way? – Ramtin Jan 20 '13 at 14:09
  • 2
    What part of the error message don't you understand? – SLaks Jan 20 '13 at 14:11
  • You really need to provide more information and context describing on how you got to the error when expecting answers from the community. – Pierre Aug 13 '14 at 07:10

3 Answers3

41

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

SteveCav
  • 6,649
  • 1
  • 50
  • 52
26

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

List of Cultures

Venson
  • 1,772
  • 17
  • 37
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.

Andrii
  • 1,081
  • 1
  • 11
  • 24