急求,用户 'sa' 登录失败,怎么解决啊?
Server Error in '/' Application.用户 'sa' 登录失败。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: 用户 'sa' 登录失败。
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): 用户 'sa' 登录失败。]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009598
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +183
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +239
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +524
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +479
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
System.Data.SqlClient.SqlConnection.Open() +125
System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +52
[EntityException: The underlying provider failed on Open.]
System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +161
System.Data.EntityClient.EntityConnection.Open() +98
System.Data.Objects.ObjectContext.EnsureConnection() +81
System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +46
System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +38
System.Linq.Enumerable.Single(IEnumerable`1 source) +108
System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__3(IEnumerable`1 sequence) +4
System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle(IEnumerable`1 query, Expression queryRoot) +24
System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +87
System.Linq.Queryable.Count(IQueryable`1 source) +243
WebUi.Account.Login.LoginButton_Click(Object sender, ImageClickEventArgs e) in D:\WebUi\Account\Login.aspx.cs:39
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +120
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
--------------------编程问答-------------------- 很可能是没有放开sa登录权限,默认是不允许sa登陆,网上搜 --------------------编程问答-------------------- 打开数据库,直接用混合模式验证,以sa登陆,看是否成功 --------------------编程问答-------------------- Refer:
http://www.cnblogs.com/insus/p/3147712.html
http://www.cnblogs.com/insus/archive/2013/06/07/3123548.html --------------------编程问答-------------------- 密码对不,用数据库客户端登陆试试 --------------------编程问答-------------------- 服务是否开启,端口可对,sa权限有吗, --------------------编程问答--------------------
+1 --------------------编程问答-------------------- 请使用sql server身份验证登录,链接字符串,如:
Data Source=.;Initial Catalog=你的数据库名;Persist Security Info=True;User ID=sa;Password=123
用户名和密码修改为你自己的。 --------------------编程问答-------------------- 启动sql服务 --------------------编程问答-------------------- 这问题多种情况导致的。你的前提是什么?? --------------------编程问答-------------------- 使用混合模式,设置一个sa密码。 --------------------编程问答-------------------- 我都试过了,怎么还是不行啊!在此之前发布网站,能够正常访问数据库,但是重新发布新网站,就不行了。求解啊 --------------------编程问答-------------------- 是不是你链接字符串写得不对! --------------------编程问答-------------------- 一般这种情况都是链接字符串写得不对的原因! --------------------编程问答--------------------
先使用window 登录 修改 sa的密码,然后密码策略。 --------------------编程问答-------------------- 连接数据库的字符串和数据库登录的身份不合,你试着用Windows身份模式登录SQL Ssever!!! --------------------编程问答--------------------
++ --------------------编程问答-------------------- ++ --------------------编程问答--------------------
++
很可能是没有放开sa登录权限,默认是不允许sa登陆,网上搜
++
+++ --------------------编程问答-------------------- 哎,感谢上面各位的回答,问题还是没解决啊!郁闷。。。。。
补充:.NET技术 , ASP.NET