授予用户权限,并且根据用户权限,用户可以访问特定页面,菜单的其余部分和页面不能被这些特定用户访问 [英] Given User Permission and as per User Permission user can access particular page and rest of the Menu and page cant be access for these particular User

查看:128
本文介绍了授予用户权限,并且根据用户权限,用户可以访问特定页面,菜单的其余部分和页面不能被这些特定用户访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个User_Permission页面,以便对每个用户进行访问控制,因此,当用户登录时,它将重定向到该特定页面,我在User_Permission页面中提到了该页面,其余页面以及他也无法访问Menu


帮助我

I am Creating one User_Permission Page for given access control to each user, so when the user login ,it will redirect to that particular page which i mention in User_Permission Page and rest of the Page he cant be access as well as Menu also


Help me

推荐答案

使用表单身份验证.
在web.config
上使用类似的东西
Use Forms Authentication.
Use some thing like this at web.config
<location path="secure">
    <system.web>
      <authorization>
        <deny users="?"/>
        <deny users="jhon"/>
      </authorization>
    </system.web>
  </location>



secure是一个包含安全Web表单的文件夹.



secure is a folder which contains your secure webforms.

<authentication mode="Forms">
      <forms loginUrl="Default.aspx"

           protection="All"

           timeout="30"

           name=".ASPXAUTH"

           path="/"

           requireSSL="false"

           slidingExpiration="true"

           defaultUrl="default.aspx"

           cookieless="UseDeviceProfile"

           enableCrossAppRedirects="false" >
        <credentials passwordFormat="Clear">
          <user name="kim" password="kim@123"/>
          <user name="jhon" password="jhonn"/>
        </credentials>
      </forms>
    </authentication>



现在,您必须找出服务器端代码来完成此操作



Now you have to find out server side code to complete this


为此使用表单身份验证

试试这个链接

链接[^ ]
Use Forms Authentication for that

try this link

Link [^]


让在给出答案之前,我会尽力理解您的问题.

您有一个登录页面,并且根据用户的角色,登录页面应该有所不同?那就是你想要的吗?
Let me try to understand your question before giving an answer.

You have a login page and based on the role of the user the landing page should vary ? Is that what you want ?


这篇关于授予用户权限,并且根据用户权限,用户可以访问特定页面,菜单的其余部分和页面不能被这些特定用户访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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