utilitaire
Regular
- Joined
- May 4, 2005
- Messages
- 77
I'm building a web application with this structure:
myApp/
loginAdmin.aspx
loginsuperAdmin.aspx
web.config
admin/
web.config
superadmin/
web.config
The «admin» directory is for the clients. The «superadmin» is for the administrators. myApp/loginAdmin.aspx allows clients to gain access to the «admin» directory. Here's my web.config in the «admin» directory:
<authorization>
<allow users="admin"/>
<deny users="*"/>
</authorization>
My problem is here: I want to create the same authorization for the superadmin directory. I can't just do:
<authorization>
<allow users="superadmin"/>
<deny users="*"/>
</authorization>
in the superadmin directory. Cause the myApp/web.config, in the root, will redirect the administrator to the CLIENT login page(myApp/loginAdmin.aspx). This configuratin is written in the myApp/web.config:
<authentication mode="Forms">
<forms loginUrl="loginAdmin.aspx" path="/" timeout="60"/>
<passport redirectUrl="admin/page1.aspx"/>
</authentication>
So: is there a way to configure something in order to redirect the clients to the correct login page, depends on witch directory they're browsing(admin/superadmin)? If I try to access the superadmin directory, I want to by redirect to myApp/loginSuperadmin.aspx. If I try to access the admin directory, I want to by redirect to myApp/loginadmin.aspx.
thank you,
forgive my english
:-\
myApp/
loginAdmin.aspx
loginsuperAdmin.aspx
web.config
admin/
web.config
superadmin/
web.config
The «admin» directory is for the clients. The «superadmin» is for the administrators. myApp/loginAdmin.aspx allows clients to gain access to the «admin» directory. Here's my web.config in the «admin» directory:
<authorization>
<allow users="admin"/>
<deny users="*"/>
</authorization>
My problem is here: I want to create the same authorization for the superadmin directory. I can't just do:
<authorization>
<allow users="superadmin"/>
<deny users="*"/>
</authorization>
in the superadmin directory. Cause the myApp/web.config, in the root, will redirect the administrator to the CLIENT login page(myApp/loginAdmin.aspx). This configuratin is written in the myApp/web.config:
<authentication mode="Forms">
<forms loginUrl="loginAdmin.aspx" path="/" timeout="60"/>
<passport redirectUrl="admin/page1.aspx"/>
</authentication>
So: is there a way to configure something in order to redirect the clients to the correct login page, depends on witch directory they're browsing(admin/superadmin)? If I try to access the superadmin directory, I want to by redirect to myApp/loginSuperadmin.aspx. If I try to access the admin directory, I want to by redirect to myApp/loginadmin.aspx.
thank you,
forgive my english
:-\