ASP. NET Exception error: Try to read or write the protected memory. This usually indicates that other memory is damaged.

Source: Internet
Author: User

Today, I encountered a problem during development: "system. accessviolationexception is not handled.
Message = "try to read or write the protected memory. This usually indicates that other memory is damaged. "
This usually indicates that other memory is damaged. I do not know whether you have encountered this error because users repeatedly write or open files,

This error occurs when memory resources are not released in time. This error cannot be tracked and must be forcibly released!

There is no forcible release method. The underlying COM component controls the addition and release of Objects Based on the number of times your process calls the component (the object release will be delayed,

Com itself ). Generally, the method is called to force garbage collection or the method that AO comes with to recycle objects, and the effect is not obvious. The solution is as follows:

1. Restart IIS. (I solve it in this way .)

2. Close the vs process and exit vs2005.

3. If the above method does not work, you canProgramTo forcibly release com resources, call the marshal. releasecomobject () method

Objects that are no longer in use are released. See http://hi.baidu.com/murphy1314/blog/item/a61bf0996e12850d6e068c3d.html for details

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.