WPF中C#3.5的登录代码 [英] login code for c#3.5 in wpf

查看:82
本文介绍了WPF中C#3.5的登录代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有登录标签,密码控制和部门标签,我想要使用数据集登录代码.
表名是login_tbl(登录列,密码列)其他的工作.原则上:

请勿 存储大文本密码,这将带来巨大的安全风险,并且如果将查询发送到远程服务器上的值可以在网络上被截获.而是存储密码的盐散列"(此术语为Google)并在登录表中存储盐.

使用SqlCommand(google,为此,有很多示例)来获取用户ID的密码和盐,然后检查它们是否匹配.还有其他从数据库中获取数据的方法,例如LINQ to SQL或Entity Frameworkm,其原理保持不变,您应该选择最适合自己目的的技术.


i have login label and password control and department label for that i want login code using dataset.
table name is login_tbl(login column, password column)

解决方案

Please read the Site Guidance about asking a question, we do not provide code here when it is just doing someone else''s work. In principle:

DO NOT store the plain text password, it is a huge security risk, and if the query is sent to a remote server the values can be intercepted on the network. Instead store a "salted hash" (google for this term) of the password and store the salt om the login table.

Use an SqlCommand (google for this, there are plenty of examples) to get the password and salt for the user ID, then check they match. There are other ways of getting the data out the database such as LINQ to SQL or the Entity Frameworkm, the principle remains the same and you should choose the technology most suitable for your purposes.


这篇关于WPF中C#3.5的登录代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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