首页 新闻 会员 周边 捐助

ado.net entity 一个链接符配置怎么都不行非常着急

0
悬赏园豆:5 [已关闭问题] 关闭于 2009-12-24 10:31

这是程序的配置 我怎么改都不得不知道怎么办的
<add name="Database1Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=10.101.2.12;Initial Catalog=Database1;User ID=sa;Password=sa;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
我这样的配置但还是有错误提示如下
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------

用户 '' 登录失败。该用户与可信 SQL Server 连接无关联。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Data.SqlClient.SqlException: 用户 '' 登录失败。该用户与可信 SQL Server 连接无关联。

[SqlException (0x80131904): 用户 '' 登录失败。该用户与可信 SQL Server 连接无关联。]
  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844759
  System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
  System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
  System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
  System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
  System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
  System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
  System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
  System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +4859187
  System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
  System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
  System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
  System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
  System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
  System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
  System.Data.SqlClient.SqlConnection.Open() +122
  System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +81

[EntityException: 基础提供程序在 Open 上失败。]

superstar的主页 superstar | 菜鸟二级 | 园豆:261
提问于:2009-12-24 10:09
< >
分享
所有回答(1)
0

Integrated Security=True  这句话是使用windows身份验证.  你又提供了用户名 密码  就是使用 sqlserver 身份  验证. 你到底搞哪样,  去掉Integrated Security=True

btg.yoyo | 园豆:67 (初学一级) | 2013-01-22 00:04
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册