有一种简单的方法来设置ASP.NET成员表中自定义数据库? [英] Is there an easy way to set up ASP.NET Membership tables in a custom Database?

查看:97
本文介绍了有一种简单的方法来设置ASP.NET成员表中自定义数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ASP.NET成员仅仅是伟大的,因为有一吨的功能,右边有被使用,并且我们不需要改变什么都没有。

ASP.NET Membership is just great as there are a ton of functionality right there to be used, and we don't need to change nothing at all.

我们甚至可以创建自己的供应商根据会员数据库,这给了我们无限的可能性,就像我不喜欢的问题/答案我只是用一个与重置链接发送了一封电子邮件。

We can even create our own Provider based on Membership database, and that give us infinite possibilities, like as I don't like the Question/Answer I just use an email that is sent with a reset link.

但是,这所有的 SQLEX $ P $干燥综合征 密度纤维板文件中完成的,我想用我自己的数据库为这个这样我就可以使用SQL Server Enterprise作为我们在办公室,而不是前preSS版。

But this is all done with SQLEXPRESS .mdf file and I wanted to use my own Database for this so I can use SQL Server Enterprise as we have in the Office and not the Express Edition.

我怎样才能轻松地使用ASP.NET成员表在我自己的数据库?

How can I easily use the ASP.NET Membership tables in my own Database?

我几年前rememebered,我们需要使用 aspnet_reg (东西)创建正确的表,但我找不到这些信息了。

I rememebered some years ago that we needed to use aspnet_reg (something) to create the correct tables, but I can't find that info anymore.

我也试过用其他会员供给者,即 Altairis.Web.Security 来自的 codePLEX 看见克里斯·佩尔斯的视频上创建一个新的成员资格提供

I also tried to use other Membership Providers, namely Altairis.Web.Security from CodePlex and saw the Chris Pels Video on creating a new Membership Provider

Altairis 解决方案,该模型是不完整的,没有几个点,如因为它提出来,只有一个会使用多个应用程序,克里斯·佩尔斯包含很多商店我需要手工创建过程。

On Altairis solution, the Model is not complete and lack several points such as Several Applications as it's made to be used with only one, and Chris Pels contains to much Store Procedures that I need to create by hand.

我给定克里斯code一去,但我只是想知道是否有将可更容易的东西。

I'm for given Chris code a go but I just wanted to know if there would be available something easier.

这一切都集成在ASP.NET MVC 2 Web应用程序。

All this is to be integrated in ASP.NET MVC 2 Web Application.

感谢

推荐答案

您有3种选择:


  1. 运行就做 aspnet_regsql.exe的:只需打开开始菜单>所有程序> Microsoft Visual Studio 2010中> Visual Studio工具> Visual Studio命令提示符( 2010),然后键入 aspnet_regsql 。向导出现,让您选择您所需的数据库。

  1. Do it by running aspnet_regsql.exe: Just open "Start Menu>All Programs>Microsoft Visual Studio 2010>Visual Studio Tools>Visual Studio Command Prompt(2010)" and then type aspnet_regsql. A wizard appears and let you select your desired database.

通过API做到这一点:使用 System.Web.Management.SqlServices 类和安装卸载方法。这将编程安装/卸载数据库工件。

Do it via API: Use System.Web.Management.SqlServices class and its Install and Uninstall methods. This will programmatically install/uninstall database artifacts.

手工进行:转到 C:\\ WINDOWS \\ Microsoft.NET \\框架\\ v4.0.30319 或类似的东西。你会发现,与安装和与卸载开始9 的.sql 文件开始9 的.sql 文件。你可以在你的数据库手动运行它们来创建所需的表/存储过程/等。但考虑SQL脚本更改数据库的名称。默认数据库名称为 ASPNETDB

Do it manually: Go to C:\Windows\Microsoft.NET\Framework\v4.0.30319 or something like. You will find 9 .sql files that begins with Install and 9 .sql files that begins with uninstall. You can run them manually in your database to create needed tables/store procedures/etc. But consider changing database name in sql scripts. Default db name is aspnetdb.

这篇关于有一种简单的方法来设置ASP.NET成员表中自定义数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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