未经授权的用户也可以访问内部页面。 [英] Unauthorized user is also getting access to internal pages.

查看:70
本文介绍了未经授权的用户也可以访问内部页面。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试构建一个Web应用程序,其中,

1.包含母版页和内部页面(内容页面到母版页面)。 />
2.当应用程序启动时,用户将被带到Login.aspx页面(这不是母版页的内容页面。)

3.一旦用户有效(经过身份验证) ,他将被重定向到母版页中的一个内容页面。





我已经完成了这个。

我正在使用< authentication mode =Form>

我还使用了< authorization>

< deny users =?>



仍然,

我面临的问题是:



当用户显示登录页面,如果用户请求页面间(例如:/TicketAdmin.aspx),页面将显示给他。



当我用HttpContext检查时。 Current.User.Identity.IsAuthenticated .. -it为他返回True!





请帮助......







问候

Kiran

Hi,
I am trying to build an web application in which,
1. Contains Master page and internal pages (Content pages to Master page).
2.When application is started, user is taken to Login.aspx page (which is not a content page of Master page.)
3. Once user is valid (authenticated), he will be redirected to one of the content pages in master page.


I have completed up to this.
I am using <authentication mode="Form">
I also used <authorization>
<deny users="?">

Still,
Problem i am facing is:

When user is shown Login page, If user requests for inter page (say: /TicketAdmin.aspx), The page will be shown to him.

When i checked with HttpContext.Current.User.Identity.IsAuthenticated .. -it returns True for him!


Kindly help...



Regards
Kiran

推荐答案

只是不显示受限制内容给未经授权的用户。有什么问题?

请记住,任何用户都可以请求任何页面。这取决于您在此页面上显示的内容。 ASP.NET和任何其他服务器端技术的全部目的是根据一些数据动态生成HTML页面和任何其他资源,以响应HTTP请求。



-SA
Just don't show the restricted content to an unauthorized user. What's the problem?
Remember that any user can request any page. It's up to you what to show on this page. The whole purpose of ASP.NET and any other server-side technology is to generate HTML pages and any other resources dynamically, depending on some data, in response to HTTP request.

—SA


这篇关于未经授权的用户也可以访问内部页面。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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