Robert
Robert

Reputation: 1597

Culture name is not supported

I'm receiving "culture name 'uploads' is not supported" when my ASP.NET application start. Where do I have to view/debug to toggle the error?

A full-text search for "uploads" returns 0 entries in my project.

Upvotes: 23

Views: 24854

Answers (7)

edokan
edokan

Reputation:

Do not worry, it is not a real error.

When the runtime tries to find which resource assemblies exists, it tries to enumerate folders where compiled DLL files reside. It assumes the name of the folder is the culture name, so it tries to create a culture for it. Unfortunately uploads is a folder which is created automatically by ASP.NET, and it is obviously not a culture :).

The runtime ignores some predefined folders like "hash", but not "uploads". So we have to live with it.

Upvotes: 14

Eric Petroelje
Eric Petroelje

Reputation: 60498

It sounds like maybe you have some code somewhere that is trying to set the culture based on a URL pattern (this may be tracked down if it is possible to get a stack trace). For example, sometimes I'll set up multi-lingual sites with URLs like this:

http://www.example.com/en-US/
http://www.example.com/es-MX/

I'll then have code in my base page that looks at the URL and attempts to set the culture based on the URL path. But if you tried to hit a URL like:

http://www.example.com/uploads

It would fail with an error like what you are seeing if you just blindly take the first path element and try to use it as the culture without checking it first.

Upvotes: 3

Kirtan
Kirtan

Reputation: 21695

If the application is it built upon DotNetNuke (and not a simple ASP.NET application), this kind of error generally occurs in DotNetNuke due to the issue described in Culture name '__page' is not supported.

If you are not using DotNetNuke, check your Application_Start code (in the Global.asax file). It might be setting the CultureInfo. Or check your web.config file for any invalid culture values.

Upvotes: 1

user322535
user322535

Reputation: 51

JumpingLethalRampage, instead of unchecking all "Commong Language Runtime Exceptions," you could uncheck just "Common Language Runtime Exceptions > System > System.ArgumentException." You don't need to uncheck all CLR items.

Upvotes: 5

Alex
Alex

Reputation: 251

I've deleted this folder and it solved the problem: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8dfb04ef\44bf70fb\uploads

Upvotes: 25

I am getting the exact same error. ["culture name 'uploads' is not supported"]. I do not know what is causing it but I've been able to get around it by clicking [Debug|Exceptions (Ctrl-alt-E) and un-checking "Common Language Runtime Exceptions". I do not have an 'uploads' folder or file in my project and there is nothing in my project that has anything to do with multilingual support and the error fires right off the bat when I run my project ... looking at the call stack just walks me through a whole lot of mscorlib calls. I have no clue why it's even getting called.

Upvotes: 5

Cerebrus
Cerebrus

Reputation: 25775

Assuming that your search through the project wasn't restrictive (widest possible search in all files), then my guess would be that your browser has a User language set to a custom string - "uploads".

In IE, you can check via Tools -> Options -> Languages -> Add -> User defined language.

Upvotes: 0

Related Questions