简体   繁体   中英

ASP .NET Error when redirect to another page: Attempted to read or write protected memory. This is often an indication that other memory is corrupt

I tried to run the web and it's redirect me to my dashboard after my logging in. the database working find. data are displayed correctly. but when i tried to redirect to another page this error appeared: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

on my friend computer is working find.

screenshot error break

here is the code

protected void bindGvProject()
    {
        Session.Remove(GV_PROJECT);
        DataTable dt = new DataTable();

        try
        {
            using (ProjectWS.ProjectWebService ws = new ProjectWS.ProjectWebService())
            {
                ws.InsertAuditLog("Project", "Project.aspx.cs", 186, c.GetIP(), "GetProjects", CommonVariable.ACTION_RETRIEVE, loginName, DateTime.Now);
                dt = ws.GetProjects();
                Session[GV_PROJECT] = dt;
            }
        }
        catch (Exception ex)
        {
            c.LogError("Project > Project: Error on SearchProject", ex, false);
        }

        gvProject.DataSource = dt;
        gvProject.DataBind(); // error at here

        upnlSearch.Update();
        upnlSidePanel.Update();
        lbtnTotalProject.Text = dt.Rows.Count.ToString();
    }

Error Stack:

System.AccessViolationException occurred HResult=-2147467261
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Source=System.Web
StackTrace: at System.Web.Hosting.UnsafeIISMethods.MgdGetSiteNameFromId(IntPtr pConfigSystem, UInt32 siteId, IntPtr& bstrSiteName, Int32& cchSiteName) at System.Web.Configuration.ProcessHostConfigUtils.GetSiteNameFromId(UInt32 siteId) at System.Web.Configuration.ProcessHostMapPath.MapPathCaching(String siteID, VirtualPath path) at System.Web.Configuration.ProcessHostMapPath.GetPathConfigFilenameWorker(String siteID, VirtualPath path, String& directory, String& baseName) at System.Web.Configuration.ProcessHostMapPath.System.Web.Configuration.IConfigMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) at System.Web.Configuration.HostingPreferredMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) at System.Web.Configuration.WebConfigurationHost.GetStreamName(String configPath) at System.Configuration.Internal.DelegatingConfigHost.GetStreamName(String configPath) at System.Configuration.BaseConfigurationRe cord.InitConfigFromFile() at System.Configuration.BaseConfigurationRecord.Init(IInternalConfigRoot configRoot, BaseConfigurationRecord parent, String configPath, String locationSubPath) at System.Configuration.Internal.InternalConfigRoot.GetConfigRecord(String configPath) at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) at System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(String path) at Telerik.Web.X_UA_CompatbileReader.LoadWebServerConfig(String applicatio nPath) at Telerik.Web.X_UA_CompatbileReader.IsEdge(HttpContext context) at Telerik.Web.UI.RenderModeBrowserAdaptor.get_Instance() at Telerik.Web.UI.RadCompositeDataBoundControl.ResolveRenderMode() at Telerik.Web.UI.RadCompositeDataBoundControl.get_ResolvedRenderMode() at Telerik.Web.UI.RadGrid.get_GroupPanelPosition() at Telerik.Web.UI.RadGrid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.DataBind() at Telerik.Web.UI.RadGrid.DataBind() at Project.bindGvProject() in c:\\Users\\firga\\Desktop\\Nimrod\\EMS\\project\\project.aspx.cs:line 291
InnerException:

I tried to run my application without enter my windows 10 pro key (so i running with windows 10 home) it's worked. the bug is disappear. may be something going wrong with my windows update or else.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM