2 u012853254 u012853254 于 2013.11.16 00:57 提问

用户 'sa' 登录失败。

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

异常详细信息: System.Data.SqlClient.SqlException: 用户 'sa' 登录失败。

源错误:

行 36: }
行 37: if (con.State == System.Data.ConnectionState.Closed)
行 38: con.Open();
行 39: }
行 40: #endregion

源文件: f:\360data\重要数据\我的文档\Visual Studio 2005\WebSites\WebSite1\BBS\App_Code\DataBase.cs 行: 38
[SqlException (0x80131904): 用户 'sa' 登录失败。]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +118
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +379
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +3922
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +70
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +406
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +740
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +415
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +310
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +775
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +89
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +625
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +163
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +884
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +187
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +143
System.Data.SqlClient.SqlConnection.Open() +262
DataBase.Open() in f:\360data\重要数据\我的文档\Visual Studio 2005\WebSites\WebSite1\BBS\App_Code\DataBase.cs:38
DataBase.CreateDataAdaper(String procName, SqlParameter[] prams) in f:\360data\重要数据\我的文档\Visual Studio 2005\WebSites\WebSite1\BBS\App_Code\DataBase.cs:181
DataBase.RunProcReturn(String procName, String tbName) in f:\360data\重要数据\我的文档\Visual Studio 2005\WebSites\WebSite1\BBS\App_Code\DataBase.cs:162
ModuleManage.GetAllModule(String tbName) in f:\360data\重要数据\我的文档\Visual Studio 2005\WebSites\WebSite1\BBS\App_Code\ModuleManage.cs:145
ModuleManage_ModuleInfo.dlBind() in f:\360data\重要数据\我的文档\Visual Studio 2005\WebSites\WebSite1\BBS\ModuleManage\ModuleInfo.aspx.cs:44
ModuleManage_ModuleInfo.Page_Load(Object sender, EventArgs e) in f:\360data\重要数据\我的文档\Visual Studio 2005\WebSites\WebSite1\BBS\ModuleManage\ModuleInfo.aspx.cs:18
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +37
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +91
System.Web.UI.Control.OnLoad(EventArgs e) +127
System.Web.UI.Control.LoadRecursive() +92
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3370


版本信息: Microsoft .NET Framework 版本:2.0.50727.4984; ASP.NET 版本:2.0.50727.4971

1个回答

yy19940208
yy19940208   2013.11.17 15:05

你本地的SqlServer能登陆吗?

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!