Change language of error messages in ASP.NET

I developing ASP.NET application using a Swedish version of Windows XP and Visual studio Professional. When ever i get an error aka. “yellow screen of death” the error message is in swedish, making it a bit hard to search for info about it.

How can i change what language the error messages in ASP.NET uses?

I have no language pack installed for the .net framework. I am however running an english windows xp with a swedish language interface pack on it.

I also have this in my web.config:

<system.web>
   <globalization uiCulture="en-US" />
</system.web>

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

In web.config add:

<system.web>
   <globalization uiCulture="en-US" />
</system.web>

or whatever language you prefer (note: uiCulture=”en-US” not culture=”en-US”).

Also you should check that your app is not changing the uiCulture, for example to a user-specific uiCulture in global.asax.

If the error occurs before or during processing the web.config file, this will of course make no difference. In this case, you need to change the regional settings of the account under which the ASP.NET app is running.

If you are developing with VS2005 or later, you’re probably running under the Cassini web server, under the identity of the current user – so just change the current user’s settings. If you’re using IIS, you probably want to change the regional settings of the ASPNET account – you can do this from Regional Settings in the Control Panel by checking the checkbox “Apply to current user and to the default user profile”.

Method 2

I had the same issue recently on IIS version 10 and these steps fixed it.

  1. Open IIS Manager
  2. Select the server from the Connections panel
  3. Under the “ASP.NET” double click on “.NET Globalization”
  4. Edit “UI Culture” property
  5. Optionally set the “File” property to “utf-8”
  6. Finally click “Apply” and restart the server.

Method 3

You can find your error translated into English on finderr.net

or

The second solution to this problem is to move, delete or rename a file containing translations of exceptions. These translations are in file:

%windir%assemblymscorlib.resources.dll { version: 2.0.0.0 culture: sv token: b77a5c561934e089}

After the change you have to restart .NET framework.
Important information: Do it on your own risk and I do not know what are the side effects to this solution.

Method 4

I had this problem aswell. I had given up, untill I today gave it another try, that worked;

Open CMD as administrator, and then type “LPKSETUP” and hit enter, and then uninstall the language that is causing the issue.

All credit goes to spunk.funk (source)

This worked for me.
And it seems that the timezone and localized keyboard still works, which is the only localized things I want.

Method 5

Aren’t the error messages dependent on the installed .NET Framework? I.e. you could just uninstall the Swedish language pack for .NET. On the production server, you’ll most likely have an English-only Framework anyway.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x