日期:2014-05-18  浏览次数:20427 次

运行成功,发布成功,但在iis中浏览时出现链接数据库错
开发工具:vs2005   +   access2003
在vs2005中点击运行,对数据库的操作都能实现,不存在任何问题
在编写工作完成后,便发布网站,整个过程没有出现任何错误

然后我在iis中新建了一个网站(win2003   sp1),浏览时,只要是有操作数据库的页面均出现错误,内容如下:

////////////////////////////////////////////////////////////////错误信息开始//////////////////////////

“/”应用程序中的服务器错误。
未指定的错误
说明:   执行当前   Web   请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息:   System.Data.OleDb.OleDbException:   未指定的错误

源错误:

执行当前   Web   请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:

[OleDbException   (0x80004005):   未指定的错误]
      System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString   constr,   OleDbConnection   connection)   +1054737
      System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions   options,   Object   poolGroupProviderInfo,   DbConnectionPool   pool,   DbConnection   owningObject)   +53
      System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection   owningConnection,   DbConnectionPoolGroup   poolGroup)   +27
      System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection   owningConnection)   +47
      System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection   outerConnection,   DbConnectionFactory   connectionFactory)   +105
      System.Data.OleDb.OleDbConnection.Open()   +37
      System.Data.Common.DbDataAdapter.FillInternal(DataSet   dataset,   DataTable[]   datatables,   Int32   startRecord,   Int32   maxRecords,   String   srcTable,   IDbCommand   command,   CommandBehavior   behavior)   +121
      System.Data.Common.DbDataAdapter.Fill(DataSet   dataSet,   Int32   startRecord,   Int32   maxRecords,   String   srcTable,   IDbCommand   command,   CommandBehavior   behavior)   +137
      System.Data.Common.DbDataAdapter.Fill(DataSet   dataSet,   String   srcTable)   +83
      System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments   arguments)   +1746
      System.Web.UI.WebControls.AccessDataSourceView.ExecuteSelect(DataSourceSelectArguments   arguments)   +71
      System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs   e)   +96
      System.Web.UI.WebControls.ListControl.PerformSelect()   +31
      System.Web.UI.WebControls.BaseDataBoundControl.DataBind()   +68
      System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()   +61
      System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs   e)   +26
      System.Web.UI.Control.PreRenderRecursiveInternal()   +110
      System.Web.UI.Control.PreRenderRecursiveInternal()   +193
      System.Web.UI.Control.PreRenderRecursiveInternal()   +193
      System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint,   Boolean   includeStagesAfterAsyncPoint)   +6532

////////////////////////////////////////////错误信息结束//////////////