views:

88

answers:

1

I have a .NET application that talks to the AD in order to all the user to change the password of the AD account. It is a web application used internationally and I can't assume that the user speaks English.

So I need to translate error messages like "Password does not meet the password policy requirements" into whatever culture the user sends to the webserver.

  • Can I use any internal translation tables or do I manually have to translate the messages via the returned error codes using my own translation tables?
  • Is there any way to install all possible ressource files for all supported cultures on that server - so that new Win32Exception(errorcode).Message will result in the right message?
A: 

You can create a custom error page that your site is redirected to the page you've created:

<customErrors defaultRedirect="http://hostName/applicationName/errorStatus.aspx" mode="On">
    <error statusCode="404" redirect="filenotfound.htm" />
</customErrors>

In your errorStatus.htm you can use .NET's globalization features to localize your error message to the appropriate language and culture.

Mark
Hmm, I guess I haven't made myself clear enough. It is not about general error handling in ASP.NET type scenarios. I was asking about printing the polish equivalent of "Password does not meet the password policy requirements" even on a server that has a regular Win2003 EN installed. Wouldn't it be the case that the .NET Framework would still default to English?
Tobias Hertkorn
Mark