asp.net - Displaying a particular web page when user roles don't match the <allow roles> tag in Web.config -
we display particular web page when role of people not administrators, sfaff , data entry administrators logged in our asp.net web site.
we display web page called entrynotallowed.aspx
this markup in web.config file looks controls can access web page called attendance.aspx:
<!-- administrators, staff , data entry administrators may access web forms listed here. --> <location path="attendance.aspx"> <system.web> <authorization> <allow roles="administrators,dataentryadministrators,staff" /> <deny users="*" /> </authorization> </system.web> </location> is there can add coding call web page when roles not shown here?
the coding works fine blocking users attendance.aspx web page want display entrynotallowed.aspx in scenario.
please check following thread custom approach suggested - http://forums.asp.net/t/1660685.aspx/1 have handle application_endrequest event , check access denied , redirect if necessary.
Comments
Post a Comment