Forum Moderators: open
Now within those web.config files i have this
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="../permissionsError.aspx" />
</customErrors>
<authorization>
<deny roles="Dealer" />
<allow roles="SiteAdmin" />
<allow roles="DealershipAdmin" />
<allow roles="SuperAdmin" />
</authorization>
</system.web>
</configuration>
as you can see anyone with the role Dealer is not allowed to see those pages. I am trying to redirect them to the file
site/admin/permissionsError.aspx but it keeps redirecting to login.aspx. Does anyone know why? Thanks,
<authentication mode="Forms">
<forms defaultUrl="Default.aspx" loginUrl="~/Login.aspx" slidingExpiration="true" timeout="20">
</forms>
</authentication>
In this page you could check Request.IsAuthenticated to see if the user is logged in. If this is the case, you can redirect them to the permissionsError page.