简体   繁体   English

到sqlmembershipprovider asp.net的连接字符串

[英]connectionstring to sqlmembershipprovider asp.net

I have added the sqlmembershipprovider to my dynamic data project for logging in and registering and such. 我已将sqlmembershipprovider添加到我的动态数据项目中,以进行登录和注册等。

However, I am having problems with the connection string. 但是,连接字符串有问题。 The database is on a remote sql server 2008 database server. 该数据库位于远程sql server 2008数据库服务器上。

Below I have a connection string for the entities: 下面有一个实体的连接字符串:

<add name="xxEntities" 
connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=xx.xx.x.xxx;Initial Catalog=XX;Integrated Security=True;MultipleActiveResultSets=True&quot;" 
providerName="System.Data.EntityClient" />

When I hit the membership provider, I get this error: 当我点击会员资格提供程序时,出现以下错误:

Keyword not supported: 'metadata'. 不支持的关键字:“元数据”。

on this line of code: 在这行代码上:

System.Web.Security.Membership.GetAllUsers(0, 1, count) System.Web.Security.Membership.GetAllUsers(0,1,计数)

Do I need a separate connection string for the provider? 提供程序是否需要单独的连接字符串? Or should I be able to use the above string with all my connections, including my membership provider? 或者我应该能够在所有连接中使用上述字符串,包括会员资格提供程序吗?

thanks. 谢谢。

尝试使用此connectionString模板+更改用户ID,密码,初始目录

Provider=SQLOLEDB.1;Persist Security Info=True;Data Source=xxx.xxx.xxx.xxx;User ID=RemoteApp;Password=xxx;Initial Catalog=xxx;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM