且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过复制和粘贴页面的url,我无需登录即可访问特定页面.

更新时间:2023-12-02 10:34:52

这可能是因为登录凭据存储在会话cookie中,该cookie在浏览器选项卡之间持续存在.如果您可以登录时粘贴URL,并且可以正常工作,则说明您有问题.实际上,它比问题更方便.
It''s probably because the login credentials are stored in a session cookie, which persists between browser tabs. If you can paste the URL when you''re not logged in, and it works, the you have a problem. As it is, it''s more of a convenience than a problem.


在登录期间.
将表的行ID插入到Session中,然后在每个页面加载检查会话中是否具有任何值.
如果为Null,则不会通过登录进入,因此请打印任何错误消息.!
During Login Time.
Insert the Row ID of table into Session and the on every page load check that is session is having any value or not.
if It is Null, its does not Came through login so print any error message.!


您需要做的就是放置授权.身份验证完成后,授权用户可以访问给定页面.

看这里:
ASP.NET身份验证和授权 [ MSDN:ASP.NET授权 [
All you need is to put Authorization in place. Once authentication is done, authorized users can access a given page.

look here:
ASP.NET authentication and authorization[^]
MSDN: ASP.NET Authorization[^]