且构网

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

请勿使用Formauthentication检查用户是否登录

更新时间:2023-12-04 08:37:40

您好,

您可以使用登录状态控制



http://msdn.microsoft.com/en-us/library/cc295456.aspx


这里 [ ^ ]是表单身份验证的详细信息。

此处 [ ^ ]是表单身份验证的示例。



注意:仔细阅读所有内容,因为这一切都取决于身份验证,授权y你正在使用。


在验证用户身份后,你需要在会​​话中存储userid。您可以在需要检查用户是否登录时检查会话。



我认为您需要学习FormAuthentication Basics。以下是一些链接,它将告诉您有关FormAuthentication的信息:

解释: ASP.NET中的表单身份验证 [ ^ ]

使用C#在ASP.NET中进行表单身份验证:提升 [ ^ ]

在ASP.NET中进行身份验证和授权 [ ^ ]

表单身份验证配置和高级主题(C#) [ ^ ]



希望它有所帮助!

--Amit

Hello all

In my application i am using formauthentication. How to check a user is login or
not using Formauthentication.
Please tell me any one.

Thanks

Hi,
you can use Login Status control

http://msdn.microsoft.com/en-us/library/cc295456.aspx


Here[^] are the details of the form authentication .
Here[^] is and example of form authentication.

Note: Read carefully everything as it all depends on authentication, authorization you are using.


After authenticating the user, you need to store userid in session. You can check the session whenever you need to check the user is logged in or not.

I think you need to learn FormAuthentication Basics. Here is some links for you, which will tell you about FormAuthentication:
Explained: Forms Authentication in ASP.NET[^]
Forms Authentication in ASP.NET with C#: Advance[^]
Form authentication and authorization in ASP.NET[^]
Forms Authentication Configuration and Advanced Topics (C#)[^]

Hope it helps!
--Amit