安全与认证 [英] Security and authentication

查看:62
本文介绍了安全与认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在.net中做了一个小应用程序.登录后,将打开欢迎页面.
我默认使用firefox浏览器来运行此应用程序.但是,当我将URL复制并粘贴到欢迎页面的IE(Internet Explorer)中时,该页面也会显示在I.E中.如果浏览器不同,我希望欢迎页面仅重定向到登录页面.告诉我我应该遵循的简单步骤.

I make a small application in .net. After login the welcome page is opened.
i am using firefox browser as default to run this application. But when i copy-paste the URL in IE(internet explorer) of my welcome page, then the page is displayed in I.E also. i want the welcome page simply redirect to login page if browser is different. Tell me the simple step that i should follow.

推荐答案

您需要编写代码来验证访问该页面的用户是否已登录.如果他没有登录,则将他重定向回登录页面.

不确定如何处理身份验证,但是如果您使用的是asp.net成员身份,则可以根据用户权限级别自动进行.

或者,您可以使用会话来验证当前用户.
You need to write code to verify if the user accessing the page is logged in or not. In case he is not logged in then redirect him back to login page.

Not sure how you are handling the authentication but in case you are using asp.net membership, you can have this happen automatically based on user permission levels.

Or you can use sessions to validate current user.


这篇关于安全与认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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