本文介绍了用我自己的表,表单认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小的数据库,没有什么花哨只有5桌。我想用窗体身份验证,但它会创建自己的数据库,以尽自己的东西。我不需要任何幻想,我当然不需要增加基础设施建设,但我想安全窗体身份验证提供。我有一个人的表,使用登录名和密码字段。我怎样才能让这样的形式使用这些字段并返回我的用户ID?这是甚至可能的形式?如果没有,我怎么能做出这么的形式创建它在我的数据库基础设施,这样就可以与那些形式需要工作?合并我的表

I have a small db, nothing fancy just 5 tables. I would like to use forms authentication but it creates its own db to do its stuff. I don't need anything fancy, and I certainly don't need the added infrastructure, but I'd like the security forms authentication provides. I have a person table, with a login and password field. how can I make it so forms uses these fields and returns my users id? is this even possible with forms? if not, how can I make it so forms creates it's infrastructure on my db so I can merge my tables with the ones forms needs to work?

我知道这可能是很简单,但我还没有发现在网络上的任何研究小时后。

I know this is probably quite simple but I haven't found anything on the net after hours of research.

推荐答案

如果你想使用自己的表,那么你将不得不的。这使您可以使用自己的表和存储过程,但仍然挂钩到窗体身份验证结构。

If you want to use your own tables then you're going to have to implement your own MembershipProvider. This allows you to use your own tables and stored procedures, but still hook into the forms auth structure.

这篇关于用我自己的表,表单认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 17:12