akrashdi
04-24-2004, 06:23 PM
Hi,
Situation is : My application is connected to same SQL Server DB but I have three folders with three type of logins. Following is the description of each folder.
www.mydomain.com/customer
www.mydomain.com/mainApp
www.mydomain.com/affiliate
How can implement different login authentication for all these. For example if someone trys to have access .aspx page in customer it should go to :
www.mydomain.com/customer/login.aspx
The same for other folders.
I tried to implement it by putting the 'web.config' in rout directory with following configuration, (but nothing happens, because it allows to access all the .aspx pages without sending to directory's login page.)
<Location path="customer/">
<system.web>
<authentication mode="Forms">
<forms name="AuthCookie" loginUrl="customer/customer_login.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<customErrors mode="Off"/>
</system.web>
</Location>
<Location path="mainApp/">
<system.web>
<authentication mode="Forms">
<forms name="AuthCookie" loginUrl="mainApp/login.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<customErrors mode="Off"/>
</system.web>
</Location>
<Location path="affiliate/">
<system.web>
<authentication mode="Forms">
<forms name="AuthCookie" loginUrl="affiliate/affiliate_login.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<customErrors mode="Off"/>
</system.web>
</Location>
Kindly solve this problem, I'll be grateful to you if I could have a complete tutorial or a complete example for that..
Regards,
Situation is : My application is connected to same SQL Server DB but I have three folders with three type of logins. Following is the description of each folder.
www.mydomain.com/customer
www.mydomain.com/mainApp
www.mydomain.com/affiliate
How can implement different login authentication for all these. For example if someone trys to have access .aspx page in customer it should go to :
www.mydomain.com/customer/login.aspx
The same for other folders.
I tried to implement it by putting the 'web.config' in rout directory with following configuration, (but nothing happens, because it allows to access all the .aspx pages without sending to directory's login page.)
<Location path="customer/">
<system.web>
<authentication mode="Forms">
<forms name="AuthCookie" loginUrl="customer/customer_login.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<customErrors mode="Off"/>
</system.web>
</Location>
<Location path="mainApp/">
<system.web>
<authentication mode="Forms">
<forms name="AuthCookie" loginUrl="mainApp/login.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<customErrors mode="Off"/>
</system.web>
</Location>
<Location path="affiliate/">
<system.web>
<authentication mode="Forms">
<forms name="AuthCookie" loginUrl="affiliate/affiliate_login.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<customErrors mode="Off"/>
</system.web>
</Location>
Kindly solve this problem, I'll be grateful to you if I could have a complete tutorial or a complete example for that..
Regards,