Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,

with IIS when a user try to access forbidden pages, IIS shows
C#
HTTP Error 403.14 - Forbidden


Can i redirect that to my custom forbidden page?
Posted

1 solution

use the httpErrors section of the web config file and add the redirect page
HTML
<httpErrors>
       <error statusCode="403" path="/errors/403.htm" responseMode="ExecuteURL" />
</httpErrors>

refere:Using web.config to return custom 404 and 500 errors[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 9-Jan-16 3:51am    
5ed.
—SA
DamithSL 9-Jan-16 3:58am    
Thank You SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900