Hi Sir, I have a problem with my project. My Problem is: If a non administrator tries to access the Admin section, he should be redirected to an error page : "ErrorPage.aspx". I have created "ErrorPage.aspx" But, in my Program, Unauthenticated (Non Admin) user is redirected to Login Page: "SimpleUserLoginAfterRegistration.aspx". Kindly Help me Below are contents of Web.config of Root Folder:
<authentication mode="Forms"> <forms loginUrl="SimpleUserLoginAfterRegistration.aspx" defaultUrl="InnerPage.aspx" timeout="100" slidingExpiration="true" cookieless="UseCookies"> </forms> </authentication> <authorization> <allow users="*"/> </authorization>
And Here is the Webconfig settings in Administrator/Web.config :
<?xml version="1.0"?> <configuration> <system.web> <authorization> <allow roles="Administrator"/> <deny roles="Manager"/> <deny roles="User" /> </authorization> </system.web> </configuration>
Kindly Help.....
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)