I\'ve started seeing an AccessViolationException being thrown in my application a several different spots. It never occured on my development pc, our test server. It also o
In my case this was fixed when I set up 'Enable 32 Bit applications'=True for Application pool in IIS server.
I usually get "Attempted to read or write protected memory" when calling the "Show" method on some WinForms. I checked and there doesn't appear anything special about those forms. I don't know why this works (maybe someone can tell me) but usually moving the code that gets executed in the "Load" event of the form to the "Shown" event fixes it for me and I never see it again.
I had the same problem. 2.0 worked fine. after installing up to 3.5 sp1, application gets Access Violation.
installed http://support.microsoft.com/kb/971030 and my problem is solved, even though I am not using LCG.
Check to make sure you don't have threads within threads. That's what caused this error for me. See this link: Attempted to read or write protected memory. This is often an indication that other memory is corrupt
I was using OLEDB and I switched to SQL Client and it solved my problem with this error.
In some cases adding "Option Strict On" in VB.NET and resolving all issues it finds by proper casting has solved this problem for me.