“/”应用程序中的服务器错误。

尝试读取或写入受保护的内存。这通常指示其他内存已损坏。

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

异常详细信息: System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。

源错误:


行 123:        string str = this.Lbl_title.Text;
行 124:        string strContext = "select FID from TTypeNews where FNewsTypeName like '%" + str + "%'";
行 125:        int fid = Convert.ToInt32(DB.GetSingle(strContext)); 
行 126:        int curpage = Convert.ToInt32(this.LabPage.Text);
行 127:        PagedDataSource ps = new PagedDataSource();

源文件: d:\wwwroot\ha506940\WEB\news.aspx.cs    行: 125

堆栈跟踪:


[AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。]
   System.Data.Common.IDBInitializeInitialize.Invoke(IntPtr pThis) +0
   System.Data.OleDb.DataSourceWrapper.InitializeAndCreateSession(OleDbConnectionString constr, SessionWrapper& sessionWrapper) +304
   System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +193
   System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +86
   System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +29
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +4927900
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
   System.Data.OleDb.OleDbConnection.Open() +40
   LibraryComman.DBHelp.DBHelper.GetSingle(String SQLString) +77
   news.RptDataBind() in d:\wwwroot\ha506940\WEB\news.aspx.cs:125
   news.Page_Load(Object sender, EventArgs e) in d:\wwwroot\ha506940\WEB\news.aspx.cs:21
   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


版本信息: Microsoft .NET Framework 版本:2.0.50727.8813; ASP.NET 版本:2.0.50727.8955
Baidu
sogou