用户"ndt"登录失败,请帮我破译堆栈跟踪



我正在使用别人的代码。试着把它整理好。我们对服务器进行了重新成像,并上传了新的干净文件。(与之前的相同,只有这些没有被感染)我还恢复了我创建的数据库备份。

以前一切都很好,但现在我们遇到了问题。我没有这种身份验证的经验。在查询数据之前,它似乎要遍历一个mdf文件。

由于用户错误登录失败,似乎无法绕过。

[SqlException (0x80131904): Login failed for user 'ndt'.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +187
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2297
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +34
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +606
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +220
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +502
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +429
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +512
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +104
   System.Data.SqlClient.SqlConnection.Open() +177
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +118
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +140
  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
  System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1748
  System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +13
  System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
  System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +68
  System.Web.UI.WebControls.GridView.DataBind() +4
  NDTCourses.TimeKeeping.WebForm14.Page_Load(Object sender, EventArgs e) in C:Documents and SettingscflickDesktopNDTCoursesNDTCoursesTimeKeepingdeclare_time.aspx.cs:264
  System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +13
  System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +45
  System.Web.UI.Control.OnLoad(EventArgs e) +98
  System.Web.UI.Control.LoadRecursive() +71
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4315

<connectionStrings>
  <remove name="LocalSqlServer" />
  <add name="LocalSqlServer" connectionString="Data Source=TECH-ILL\SQLEXPRESS;Initial Catalog=timeKeep;Integrated Security=True"
   providerName="System.Data.SqlClient" />
  <add name="db" connectionString="Data Source=TECH-ILL\SQLEXPRESS;Initial Catalog=timeKeep;Integrated Security=True" />
  <add name="timeKeepConnectionString" connectionString="Data Source=TECH-ILLSQLEXPRESS;Initial Catalog=timeKeep;Integrated Security=True"
   providerName="System.Data.SqlClient" />
 </connectionStrings>

要么ndt服务器登录名不再存在,要么服务器登录名与数据库用户(通常称为孤立用户)不再关联。

在第一种情况下,您需要创建数据库登录,然后处理孤立用户。

孤立用户发生在将数据库恢复到新的或重建的服务器或重新创建数据库登录时。有关解决此问题的说明,请访问http://msdn.microsoft.com/en-us/library/ms175475.aspx.

相关内容

  • 没有找到相关文章

最新更新