This displays the correct custom 404.html page when the browser language is en-US. But when I change the language to de-DE or fr-CA, the en-US error page is still displayed. Am I missing something in my configuration?
First create an error page Error404.aspx and ddd three panels, one for English text, second one for denmark and last one for French text on the error page and make one panel visible and the other invisible for displaying the message text.
You can first save the current language option in a session variable and display the selected language text on the error page based on the value of the session variable.
bullines
Member
31 Points
93 Posts
Localized Custom Error Pages
Mar 25, 2012 02:50 AM|LINK
I have a Web Forms web site project with the following folder structure:
In my web.config, I have the following:
<httpErrors errorMode="Custom"> <remove statusCode="404" /> <error responseMode="File" statusCode="404" prefixLanguageFilePath="Error" path="404.html" /> </httpErrors>This displays the correct custom 404.html page when the browser language is en-US. But when I change the language to de-DE or fr-CA, the en-US error page is still displayed. Am I missing something in my configuration?
Vipindas
Contributor
5514 Points
810 Posts
Re: Localized Custom Error Pages
Mar 25, 2012 06:16 AM|LINK
First create an error page Error404.aspx and ddd three panels, one for English text, second one for denmark and last one for French text on the error page and make one panel visible and the other invisible for displaying the message text.
You can first save the current language option in a session variable and display the selected language text on the error page based on the value of the session variable.
Or Refer this link
http://learn.iis.net/page.aspx/267/how-to-use-http-detailed-errors-in-iis/
bullines
Member
31 Points
93 Posts
Re: Localized Custom Error Pages
Mar 25, 2012 12:45 PM|LINK
That would simply be working around the functionality that is supposed to be available in IIS7+:
http://learn.iis.net/page.aspx/267/how-to-use-http-detailed-errors-in-iis/
How about scenarios where I want to have static 5xx error pages so that no server-side code is required?