如何设置网页的权限,用作url时无法查看 [英] How can set permission to a webpage ,thats can't view when use as url
本文介绍了如何设置网页的权限,用作url时无法查看的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的网站上有7个ASP网页.在用户界面网页链接中已应用.
这里有些页面需要查看保护.现在所有页面都可以通过
访问
domainname/page1.aspx.
In my website have 7 ASP webpages.In user interface webpages link applied .
And here some pages need to view protect . Now all pages can access by
domainname/page1.aspx .How can do it
推荐答案
看看这些并尝试实现它:
基于角色的授权 [ ASP.NET授权 [如何:在ASP.NET 2.0中使用角色管理器 [
Have a look at these and try to implement it:
Role-Based Authorization[^]
ASP.NET Authorization[^]
How To: Use Role Manager in ASP.NET 2.0[^]
Alternatively, you can also design it having a list of URL''s that needs protection and when they are visited, just check it during the page load of it and display ''not allowed'' or redirect to ''unauthorized''.
您将必须在web.config
文件中配置authorization
标记.请参阅此MS支持文章:如何:在ASP.NET应用程序中控制授权权限 [
You will have to configure theauthorization
tag inweb.config
file. See this MS Support article: HOW TO: Control Authorization Permissions in an ASP.NET Application[^]
Hope this helps!
这篇关于如何设置网页的权限,用作url时无法查看的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文