在ASP.NET 2.0中配置 AspNetSqlMembershipProvider(AspNetSqlProvider )
2005-03-31 12:57
495 查看
在VS.NET 2005 Beta 2
发现在
中默认的数据库是AspNetAccessProvider,Provider tab中可以选择AspNetSqlMembershipProvider ,但是test无法通过,显示错误是无法链接数据库,查找MSDN中的资料,发现配置链接信息在machine.config中设置,默认SQL Server的AspNetAccessProvider数据库是AspNetDB,而此时SQL Server 2005
中并没有该数据库,因此出现了数据库无法链接的情况。自己添加AspNetDB数据库后,再到Web Site Administration Tool中test,这次通过,链接。正高兴进入security tab下进行设置时候,出现错误,提示某某存储过程没有找到。
记得在上几个版本的CTP中支持在Web Site Administration Tool 中添加SQL 链接与数据库,而在该版本中并没有,不是否是安装 VS 2005时没有安装SQL 2005 Express(因为之前已经安装了 SQL 2005 Pro .Net FW与VS2005一致)。
继续在MSDN中找资料,发现如下文字:
The aspnet_regsql.exe executable is located in the C:\WINDOWS\Microsoft.NET\Framework\versionNumber folder on your Web server. The
You can run the
To run the
C:\WINDOWS\Microsoft.NET\Framework\versionNumber\aspnet_regsql.exe
To view help for additional options available with the aspnet_regsql.exe utility, use the
随后启动aspnet_regsql.exe
安提示,最后数据库中将自动添加多个表、视图与存储过程如下:
自此,AspNetSqlProvider配置完毕
可以正常连接数据库与测试
不知道是我愚笨还是beta版本的问题,设置起来的确麻烦,因此写下来免得遇到同类问题的朋友浪费之间
另:如何配置SQLEXPRESS的 AspNetSqlMembershipProvider 链接,就是实现想access那样可以安相对目录配置mdf数据库,我配置没有成功,如果配置成功的请指教
我的链接语句如下:Data Source=.\SQLEXPRESS;AttachDbFilename=~\App_Data\AspnetDB.mdf;Integrated Security=True
链接数据库没有问题,但是无法实现AspNetSqlMembershipProvider
发现在
中默认的数据库是AspNetAccessProvider,Provider tab中可以选择AspNetSqlMembershipProvider ,但是test无法通过,显示错误是无法链接数据库,查找MSDN中的资料,发现配置链接信息在machine.config中设置,默认SQL Server的AspNetAccessProvider数据库是AspNetDB,而此时SQL Server 2005
中并没有该数据库,因此出现了数据库无法链接的情况。自己添加AspNetDB数据库后,再到Web Site Administration Tool中test,这次通过,链接。正高兴进入security tab下进行设置时候,出现错误,提示某某存储过程没有找到。
记得在上几个版本的CTP中支持在Web Site Administration Tool 中添加SQL 链接与数据库,而在该版本中并没有,不是否是安装 VS 2005时没有安装SQL 2005 Express(因为之前已经安装了 SQL 2005 Pro .Net FW与VS2005一致)。
继续在MSDN中找资料,发现如下文字:
Configuring the SQL Server Provider
If you want to use AspNetSqlProvider to store application feature data in a SQL Server database, you must first configure SQL Server by creating the appropriate database. ASP.NET includes a command-line utility namedaspnet_regsql.exethat performs this task for you.
The aspnet_regsql.exe executable is located in the C:\WINDOWS\Microsoft.NET\Framework\versionNumber folder on your Web server. The
aspnet_regsql.execommand is used to both create the SQL Server database and to add or remove options from an existing database.
You can run the
aspnet_regsql.exeexecutable without any command-line arguments to run a wizard that will walk you through specifying connection information for SQL Server and installing or removing the database elements for all of the supported features. You can also run the aspnet_regsql.exe executable as a command-line utility to configure database elements for individual features.
To run the
aspnet_regsql.exewizard, run the
aspnet_regsql.exeexecutable without any command-line arguments as shown in the following example.
C:\WINDOWS\Microsoft.NET\Framework\versionNumber\aspnet_regsql.exe
To view help for additional options available with the aspnet_regsql.exe utility, use the
/?option.
随后启动aspnet_regsql.exe
安提示,最后数据库中将自动添加多个表、视图与存储过程如下:
自此,AspNetSqlProvider配置完毕
可以正常连接数据库与测试
不知道是我愚笨还是beta版本的问题,设置起来的确麻烦,因此写下来免得遇到同类问题的朋友浪费之间
另:如何配置SQLEXPRESS的 AspNetSqlMembershipProvider 链接,就是实现想access那样可以安相对目录配置mdf数据库,我配置没有成功,如果配置成功的请指教
我的链接语句如下:Data Source=.\SQLEXPRESS;AttachDbFilename=~\App_Data\AspnetDB.mdf;Integrated Security=True
链接数据库没有问题,但是无法实现AspNetSqlMembershipProvider
相关文章推荐
- 自定义ASP.net 2.0 Membership的步骤,和entry 'AspNetSqlMembershipProvider' has already been added错误的解决
- 自定义ASP.net 2.0 Membership的步骤,和entry 'AspNetSqlMembershipProvider' has already been added错误的解决
- 自定义ASP.net 2.0 Membership的步骤,和entry 'AspNetSqlMembershipProvider' has already been added错误的解决
- [ASP.NET 2.0 Security FAQs]如何设置SQL Server或SQL Express数据库,使其支持Membership、Profiles和Role
- 一起学ASP.NET Core 2.0学习笔记(二): ef core2.0 及mysql provider 、Fluent API相关配置及迁移
- ASP.NET 用户配置 Part.2(SQLProfileProvider)
- asp.net 2.0 membership与成员角色配置
- Asp.Net Forums 2.0 SqlDataProvider Model
- Writing A Custom Membership Provider for your ASP.NET 2.0 Web Site
- Writing a Custom Membership Provider for the Login Control in ASP.NET 2.0
- ASP.NET 2.0中MemberShip数据库的安装、配置及文档结构(一)
- Writing a Custom Membership Provider for the Login Control in ASP.NET 2.0
- Oracle10g下安装配置asp.net OracleMembershipProvider
- ASP.NET 2.0中MemberShip数据库的安装、配置及文档结构(一)
- 一起学ASP.NET Core 2.0学习笔记(二)- ef core2.0 及mysql provider 、Fluent API相关配置及迁移
- ASP.NET 2.0中MemberShip数据库的安装、配置及文档结构(一)
- (WebSite----Asp.Net Configuration----->无法连接到SQL Server数据库------>选择数据存储区---->应用程序当前被配置为使用提供程序:AspNetSqlProvider)解决方案
- [ASP.NET 2.0 Security FAQs]如何设置SQL Server或SQL Express数据库,使其支持Membership、Profiles和Role
- [转]ASP.NET 2.0中MemberShip数据库的安装、配置及文档结构(一)
- Asp.net 2.0 Membership Provider for db4o 6.1