使用asp.net中的Session和cookies创建登录页面? [英] Create login page using Session and cookies in asp.net?

查看:88
本文介绍了使用asp.net中的Session和cookies创建登录页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



如何使用asp.net中的Session和cookies创建登录页面? (使用C#编码)





谢谢和问候,

Murali。

Hi All,

How to create log in page using Session and cookies in asp.net? (Using C# coding)


Thanks and Regards,
Murali.

推荐答案

您可以使用表单身份验证 MSDN - 说明:ASP中的表单身份验证。 NET 2.0 [ ^ ]然后你不必重新发明轮子..
You could use forms authentication MSDN - Explained: Forms Authentication in ASP.NET 2.0[^] Then you don''t have to reinvent the wheel..


首先,我建议你了解会员和角色提供者等内置功能。这里有一个关于基于sql的实现的教程。使用起来非常简单:了解ASP.NET角色和成员资格 - A初学者教程 [ ^ ]。



但如果你有充分的理由不使用某些东西,你就不需要使用会员资格构建良好,可靠,(或多或少)安全。以下是一些替代方案:

http:// msdn.microsoft.com/en-us/library/xdt4thhy(v=vs.100).aspx [ ^ ]

http://devcity.net/Articles/53/1/formauth_xml.aspx [ ^ ]
First of all, I suggest you get knowing the built-in features like membership and role providers. Here you have a tutorial about the sql based implementation of it. Quite simple to use: Understanding ASP.NET Roles and Membership - A Beginner''s Tutorial[^].

But you don''t need to use membership if you have good reason not to use something that is well built, and reliable, and (more or less) secure. Here are some alternatives:
http://msdn.microsoft.com/en-us/library/xdt4thhy(v=vs.100).aspx[^]
http://devcity.net/Articles/53/1/formauth_xml.aspx[^]


尝试Ramesh Talla的博客:

< a href =http://rameshtalla.wordpress.com/2012/01/30/login-page-and-logout-page-code-using-cookies-and-sessions/>使用Cookie登录页面和注销页面代码和会话 [ ^ ]
try Ramesh Talla''s blog:
Login Page and Logout Page Code using Cookies and Sessions[^]


这篇关于使用asp.net中的Session和cookies创建登录页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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