Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

AccessViolationException

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Danny Ni - 10 May 2008 03:17 GMT
Hi,

I need help with the following exceptions, it happens to my dev machine and
live server every now and then, most of the times they happen after I
recompile the solution on my dev machine or deploy the new assembly to live
server.   TIA

Attempted to read or write protected memory. This is often an indication
that other memory is corrupt.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.AccessViolationException: Attempted to read or
write protected memory. This is often an indication that other memory is
corrupt.

Source Error:

[No relevant source lines]

Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fihf.0.cs
Line: 0

Stack Trace:

[AccessViolationException: Attempted to read or write protected memory. This
is often an indication that other memory is corrupt.]
  ASP.global_asax..ctor() in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fihf.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
  System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle&
ctor, Boolean& bNeedSecurityCheck) +0
  System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
fillCache) +103
  System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean
skipVisibilityChecks, Boolean fillCache) +268
  System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
  System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder
binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
+1036
  System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes) +114
  System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +197
  System.Web.HttpApplicationFactory.GetSpecialApplicationInstance() +27
  System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext
context) +3460678
  System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext
context) +125
  System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
context) +99
  System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350
Manish - 10 May 2008 09:14 GMT
Hi Danny,

Please make sure that you have ASPNET account read/write rights to your
Temporary ASP.NET files folder.

Regards,
Manish
www.componentone.com

> Hi,
>
[quoted text clipped - 57 lines]
>
>  
Michael Nemtsev [MVP] - 10 May 2008 13:00 GMT
Hello Danny,

what's the type of asp.net project on your dev machine - file or IIS?!
Seems that IIS. Have u tried to restart IIS after you build new version of
your assembly and before running site on dev?!

if it doesnt help, try to remove everything from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files\

seems that IIS load your new assembly to others, which were not flushed and
new changed are not correcly used

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

DN> Hi,
DN>
DN> I need help with the following exceptions, it happens to my dev
DN> machine and live server every now and then, most of the times they
DN> happen after I recompile the solution on my dev machine or deploy
DN> the new assembly to live server.   TIA
DN>
DN> Attempted to read or write protected memory. This is often an
DN> indication
DN> that other memory is corrupt.
DN> Description: An unhandled exception occurred during the execution of
DN> the
DN> current web request. Please review the stack trace for more
DN> information
DN> about the error and where it originated in the code.
DN> Exception Details: System.AccessViolationException: Attempted to
DN> read or write protected memory. This is often an indication that
DN> other memory is corrupt.
DN>
DN> Source Error:
DN>
DN> [No relevant source lines]
DN>
DN> Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
DN> ASP.NET
DN> Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fih
DN> f.0.cs Line: 0
DN>
DN> Stack Trace:
DN>
DN> [AccessViolationException: Attempted to read or write protected
DN> memory. This
DN> is often an indication that other memory is corrupt.]
DN> ASP.global_asax..ctor() in
DN> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
DN> Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fih
DN> f.0.cs:0
DN>
DN> [TargetInvocationException: Exception has been thrown by the target
DN> of an
DN> invocation.]
DN> System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
DN> publicOnly, Boolean noCheck, Boolean& canBeCached,
DN> RuntimeMethodHandle&
DN> ctor, Boolean& bNeedSecurityCheck) +0
DN> System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
DN> fillCache) +103
DN> System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean
DN> skipVisibilityChecks, Boolean fillCache) +268
DN> System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
DN> System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,
DN> Binder
DN> binder, Object[] args, CultureInfo culture, Object[]
DN> activationAttributes)
DN> +1036
DN> System.Activator.CreateInstance(Type type, BindingFlags
DN> bindingAttr,
DN> Binder binder, Object[] args, CultureInfo culture, Object[]
DN> activationAttributes) +114
DN>
DN> System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntP
DN> tr
DN> appContext, HttpContext context) +197
DN> System.Web.HttpApplicationFactory.GetSpecialApplicationInstance()
DN> +27
DN>
DN> System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext
DN> context) +3460678
DN>
DN> System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext
DN> context) +125
DN>
DN> System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
DN> context) +99
DN> System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest
DN> wr) +350
Danny Ni - 10 May 2008 16:28 GMT
Hi Michael,

I am using IIS, my solution contains one web project and 7 class libraries,
the browsers always call pages from the web project. You are right,
restarting IIS make the problems go away. But it happens to live server even
when none of the new assemblies are deployed, that's what worries me, what
if problems happen while I am sleeping?

Thanks Again

> Hello Danny,
>
[quoted text clipped - 83 lines]
> DN> System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest
> DN> wr) +350
Michael Nemtsev [MVP] - 10 May 2008 17:44 GMT
Hello Danny,

welll... u deploy nothing to production and you have the same error?!
but in your original post u wrote that it happens only after deployment'

after which actions you have such an error?!

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

DN> Hi Michael,
DN>
DN> I am using IIS, my solution contains one web project and 7 class
DN> libraries, the browsers always call pages from the web project. You
DN> are right, restarting IIS make the problems go away. But it happens
DN> to live server even when none of the new assemblies are deployed,
DN> that's what worries me, what if problems happen while I am sleeping?
DN>
DN> Thanks Again
DN>
DN> "Michael Nemtsev [MVP]" <nemtsev@msn.com> wrote in message
DN> news:900895ec3cba88ca81007359a5bc@msnews.microsoft.com...
DN>
>> Hello Danny,
>>
[quoted text clipped - 91 lines]
>> DN> System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest
>> DN> wr) +350
Danny Ni - 10 May 2008 18:36 GMT
Hi Michael,

Sorry about the verbiage misunderstanding.  What I meant :

Most of the times(90%), the errors happen after I recompile the soluion on
my dev machine or I deploy the new assemblies to live server

On occasion ( the other 10%), the live server throw this exceptions with me
doing anything. I don't know what actions caused it, I only know it after it
happened, either someone told me or I found out by myself

Thanks

> Hello Danny,
>
[quoted text clipped - 114 lines]
>>> DN> System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest
>>> DN> wr) +350

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.