简体   繁体   English

我有两个用于管理的母版页,不同,用户也不同,但是如果用户复制并粘贴URL,他可以找到页面信息

[英]I have two master pages for admin it is different and user is different but if user copy & paste the URL he can find the page information

I have two master pages in a Three Tier Architecture project. 我在“三层体系结构”项目中有两个母版页。 For admin it is different and for user it is different but if user copy & paste the URL he can find the page information. 对于管理员来说,这是不同的,对于用户而言,是不同的,但是如果用户复制并粘贴URL,他可以找到页面信息。 Give me a solution please.. 请给我一个解决方案。

You need to keep the user type in session after login. 登录后,您需要在session保留用户类型。 And on the particular page check the user type. 并在特定页面上检查用户类型。

If not matching found redirect to login page. 如果不匹配,则重定向到登录页面。

or 要么

broader solution is you need to implement Role Management of asp.net. 更广泛的解决方案是您需要实现asp.net的角色管理。
MSDN Link MSDN链接

Some useful links 一些有用的链接

  1. Admin role management in ASP.NET website ASP.NET网站中的管理员角色管理
  2. http://www.codeproject.com/Articles/667152/Role-Providers http://www.codeproject.com/Articles/667152/Role-Providers

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM