0

We recently moved our application from Windows server 2003 to Windows server 2012. Application has two components-- one is MVC and other one is simple ASP.NET with aspx pages. Application is working fine but sometimes we receive-- Attempted to read and write protected memory . This is often an indication that other memory is corrupt error.

When I checked Event Viewer for the error, below is the exception: Exception information: Exception type: HibernateException Exception message: Creating a proxy instance failed

When we get this error, we usually recycle app pool and issue gets resolve. Need your inputs for long term fix.

  • Sound like a App Pool memory issue ? Are you using a dedicated app pool for the application? If not, you probably should. – DaniDev Jul 18 '17 at 16:30
  • Yes, we are using dedicated app pool for this application – user2405121 Jul 18 '17 at 16:44
  • "but sometimes we receive" Have you been able to reproduce the behavior and Isolate to specific code (?) Can you also please post the error message(s) verbatim. – DaniDev Jul 18 '17 at 16:52
  • Yes, we were able to reproduce the issue. It happens for all the users and once we recycle our app pool--error go away. Error Details: Exception information: Exception type: HibernateException Exception message: Creating a proxy instance failedhread information: Thread ID: 7 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: at NHibernate.ByteCode.Castle.ProxyFactory.GetProxy(Object id, ISessionImplementor session) – user2405121 Jul 18 '17 at 17:24
  • what is the code that causes the error? The issue (as I originally suspected) seems to be stemming from the fact that you are running both webforms and MVC aps under the same App pool (user). One of your apps (MVC?) is using nHibernate and the app is trying to access/create a thread with (wrong) permissions... this is about as much help as I can give you based on the information you are providing. – DaniDev Jul 18 '17 at 17:51

0 Answers0