Forms Authentication and Login Pages

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Hi,

I am creating a web application which have two different login areas. One
for members and one for administrators. Currently, I am using forms
authentication to validate the login for administrators as shown below. This
works perfectly fine but I now need to add another login authentication for
members which redirects them to a different login page if they are not
authenticated. Does anyone know how I would add this to the web.config file?


<configuration>
<system.web>
<authentication mode="Forms">
<forms name="..admin" path="/" loginUrl="/admin/login.aspx"
protection="All" timeout="30"/>
</authentication>
</system.web>
<location path="admin/documents">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
</configuration>


Thanks,
Dave
 
Could use more info.... but

If you have a separate web application, you can place the security
information inside THAT applications Web.Config file, instead of trying to
do double duty on a single app.

If you are trying to class users as "admin" and "Normal", you can store that
information in the encrypted cookie as the security value, and extract that
value on page-load to verify authorization.
 
Back
Top