我怎么能有两个单独的登录页面 [英] How can I have two separate login Page

查看:78
本文介绍了我怎么能有两个单独的登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI


我如何拥有两个单独的登录页面,例如一个用于经理,一个用于用户



我的配置文件:

 <  身份验证    mode   = 表单   >  
< 表格 loginUrl = LoginManagers.aspx 超时 = 2880 / >
< < span class =code-leadattribute> / authentication >
=============== ================
< location path = 管理 >
< system.web >
< 授权 >
< allow roles = 经理 / >
< 拒绝 用户 = * / >
< / authorization < span class =code-keyword>>
< / system.web >
< /地点 >





如何调整配置文件?

解决方案

你为什么要这样?而是在登录时使用这些信息来确定它们是Manager还是User,然后将它们引导到相应的页面。角色是一种很好的方法,因为他们也可以用户限制登录用户可以通过web.config文件访问哪些文件夹。



A登录是一个登录:在此之前你不知道这个人是谁,所以你不能为不需要密码的经理创建一个简单版本 - 因为任何人都可以使用它直到他们登录。

HI
How can I have two separate login page , for Example One for managers and one for users

my Config file :

<authentication mode="Forms" >
      <forms loginUrl="LoginManagers.aspx" timeout="2880"  />
      </authentication>
===============================
 <location path="Manages">
    <system.web>
      <authorization>
        <allow roles="Manager" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>



How do I adjust the configuration file؟

解决方案

Why would you want that? Instead, use the information when they do log in to determine if they are Manager or User and direct them to the appropriate page after that. Roles are a good way to do that, as they can also be user to restrict which folders a logged-in user can access via the web.config file.

A login is a login: before that you have no idea who the person is, so you can't create a "simple" version for managers that doesn't need a password for example - as anyone can use it until they are logged in.


这篇关于我怎么能有两个单独的登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆