Click here to Skip to main content
15,886,085 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
HI all,
we need to change the default 403 forbidden access page to something else in window authentication.

the idea is if user pass window authentication then user will be redirected to admin panel based on the roles. if user do not pass window authentication than it will take user to some particular page to show him normal data based on normal user role.

currently what happen that if user fails window authentication than system automatic redirect to a page which says 403 access denied. you are not authorized to view this site.
Posted
Comments
Aravindba 27-Feb-14 0:52am    
Hi just use try catch,if it error it goes to catch part in that u redirect to another page,but i dont know if redirect page also not accessed by same user then 403 error appear.u have get fails windows authentication in that place u can use redirect to another page instead of 403 error msg.
akrishnan.nic 27-Feb-14 2:46am    
Hi, Please use custom error in webconfig file like this
<customerrors mode="Off" defaultredirect="ErrorHandler.aspx">
ravikhoda 27-Feb-14 1:05am    
the main thing is that access denied page setting is somewhere in the IIS server and not in the code. and i am not aware about that configuration and also if that is in the machine config i do not want to change over there cause there may be some more project hosted on the server.
Aravindba 27-Feb-14 1:52am    
"if user pass window authentication then user will be redirected to admin panel based on the roles"

user pass window authentication means ? user pass username and password ?
ravikhoda 27-Feb-14 1:56am    
well what we are doing is getting user name from active directory. this will be save in database with role group. so if machine name will be match than it will go to the admin panel according to role group. but if that do not match we need to show them some other page rather than access denied.

1 solution

Found a useful article on microsoft's site. Hope this will solve your problem.

http://support.microsoft.com/kb/306355[^]
 
Share this answer
 
Comments
ravikhoda 27-Feb-14 4:11am    
thanks will check this

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