web.config里的
<authentication mode="Forms">
<forms name=".aa" protection="All" timeout="60" loginUrl="aa.aspx">
<forms name=".bb" protection="All" timeout="60" loginUrl="bb.aspx">
</authentication>
这样好象行不通吧?那如果有两类用户看来也应该只有一个登录页面了。只能在登录页面里做文章了。应该让选择用户类型,再进入不同的管理页面,这样子说,对吧?
<authentication mode="Forms">
<forms name=".aa" protection="All" timeout="60" loginUrl="aa.aspx">
<forms name=".bb" protection="All" timeout="60" loginUrl="bb.aspx">
</authentication>
这样好象行不通吧?那如果有两类用户看来也应该只有一个登录页面了。只能在登录页面里做文章了。应该让选择用户类型,再进入不同的管理页面,这样子说,对吧?
你可以在前台登录页面选择用户类型,根据用户的选择,用code控制跳转到哪个页面。
而在authentication中,可以统一指定到login页面。
<authentication mode="Forms">
<forms name=".SLAUTHCOOKIE" loginUrl="login.aspx" protection="All" path="/"/>
</authentication>这样比较清晰合理。