首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

用户 'sa' 登录失败。该怎么处理

2012-05-16 
用户 sa 登录失败。在本地上测试都可以,为什么传到服务器上去就出现了:用户 sa 登录失败。[SqlException

用户 'sa' 登录失败。
在本地上测试都可以,为什么传到服务器上去就出现了:用户 'sa' 登录失败。 
[SqlException (0x80131904): 用户 'sa' 登录失败。]
  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887
  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) +185
  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
  DB.GetDataSet(String sqlStr, String table) +25
  Index.Bind() +78
  Index.Page_Load(Object sender, EventArgs e) +24
  System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
  System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
  System.Web.UI.Control.OnLoad(EventArgs e) +99
  System.Web.UI.Control.LoadRecursive() +50
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627





我把用户名取消又出现,用户名为‘null’,未与信任 SQL Server 连接相关联。 ?

[解决办法]
哥们建议你开启sql的远程连接 别只用本地的,不开启远程能连的上才怪呢!

热点排行