Change language of error messages in ASP.NET

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”.

Leave a Comment