结合使用ASP.NET Membership Provider和现有的用户数据库 [英] Using ASP.NET Membership Provider with an existing user database

查看:82
本文介绍了结合使用ASP.NET Membership Provider和现有的用户数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在用.Net重新编写整个网站.当前网站是用foxpro编写的,并使用自定义逻辑,验证规则和Sql服务器表来存储和验证用户.

I'm currently re-writting an entire website in .Net. The current website is written in foxpro and uses custom logic, validation rules, and Sql server tables to store and authenticate users.

我想使用Membership Provider,但是我有一个主要的问题,我不确定该如何克服.

I want to use Membership Provider but I have one major problem that I'm not sure how to overcome.

新站点和旧站点都必须共享用户和凭据.用户将必须能够在过渡阶段使用两个站点,而不必分别更新其个人资料.

Both, the new site and the old site have to share users and credentials. The users will have to be able to use both sites during the transition phase without having to update their profiles separately.

  1. 在不破坏现有系统的情况下实现Membership Provider的最佳方法是什么?

  1. What is the best way to implement Membership Provider without breaking the existing system?

我是否必须使用成员资格提供程序随附的所有表,视图,过程等?

Do I have to use all the tables, views, procedures, etc that come with Membership provider?

我的逻辑有缺陷吗?会员提供者值得吗?

Is my logic flawed? Is Membership Provider worth it?

非常感谢任何教程或视频链接.

Any tutorial or video links are much appreciated.

推荐答案

在过去的几天里,我一直在做更多的研究和阅读,并且看来该写作者自己的Custom Membership Provider的方法也是如此.以下是我发现最有用的一些链接.

Over the last couple of days, I've been doing more research and reading and it looks like the way to go is writting my own Custom Membership Provider. Below are some links I found most helpful.

我要说的是,尽管编写自定义成员资格提供程序将花费一些时间,但是其好处将远远超过花费的时间,因为它节省了很多其他代码.另外,它还保留了稍后转换为内置.Net成员资格提供程序的选项.如果以后要切换,只需更改web.config设置,在数据库中安装支持表,然后将当前用户隐秘到新的表集中即可.我不必触摸任何代码即可完成转换,这很酷!!!

I will say this, while writting the custom membership provider is going to take a little time, the benefits will far outweight the time it will take because it saves so much other coding. Plus it leaves open the option for converting to the built-in .Net membership provider latter on. If I do want to switch later, all I have to do is change the web.config settings, install the support tables in my DB and covert current users into the new set of tables. I shouldn't have to touch any of my code to complete the conversion which is cool!!!

链接:

会员资格简介

创建自定义成员资格提供程序

自定义成员资格提供者

步骤-分步自定义成员资格提供者创建教程

这篇关于结合使用ASP.NET Membership Provider和现有的用户数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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