locked
IIS 7 Error: Attempted to read or write protected memory RRS feed

  • Question

  • User-2007097502 posted

    Hello,

    I am using Windows 7 x64, MVC web site.

    My site on IIS suddenly stopped working with a strange error:

    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

       at System.Net.Configuration.SocketElement..ctor()

    What can be the issue?

    See below full event viewer:

    Roy.

    Event code: 3006

    Event message: A parser error has occurred.

    Event time: 5/11/2013 11:23:25 AM

    Event time (UTC): 5/11/2013 8:23:25 AM

    Event ID: 7e047094be8c45aab2baa5f26b07ac00

    Event sequence: 1

    Event occurrence: 1

    Event detail code: 0

    Application information:

        Application domain: /LM/W3SVC/2/ROOT-1-130127342054037334

        Trust level: Full

        Application Virtual Path: /

        Application Path: C:\inetpub\Musketeer\

        Machine name: ROY

    Process information:

        Process ID: 2408

        Process name: w3wp.exe

        Account name: IIS APPPOOL\Musketeer

    Exception information:

        Exception type: HttpException

        Exception message: The type initializer for 'System.Net.WebUtility' threw an exception.

       at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()

       at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()

       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

    The type initializer for 'System.Net.WebUtility' threw an exception.

       at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)

       at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)

       at System.Web.UI.TemplateParser.Parse()

       at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()

       at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)

       at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()

       at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()

       at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp)

       at System.Web.Compilation.BuildManager.CompileGlobalAsax()

       at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()

    The type initializer for 'System.Net.WebUtility' threw an exception.

       at System.Net.WebUtility.HtmlDecode(String value)

       at System.Web.UI.TemplateParser.ProcessAttributes(String text, Match match, ParsedAttributeCollection& attribs, Boolean fDirective, String& duplicateAttribute)

       at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)

       at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)

    Exception has been thrown by the target of an invocation.

       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)

       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)

       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)

       at System.Activator.CreateInstance(Type type, Boolean nonPublic)

       at System.Configuration.TypeUtil.CreateInstanceWithReflectionPermission(Type type)

       at System.Configuration.ConfigurationElement.get_Item(ConfigurationProperty prop)

       at System.Net.Configuration.SettingsSection.get_Socket()

       at System.Net.Configuration.SettingsSectionInternal..ctor(SettingsSection section)

       at System.Net.Configuration.SettingsSectionInternal.get_Section()

       at System.Net.WebUtility..cctor()

    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

       at System.Net.Configuration.SocketElement..ctor()

    Saturday, May 11, 2013 4:28 AM

Answers

  • User-2007097502 posted

    Hello,

    In the end i uninstalled all visual studio(s), sql server(s), .net framework(s)

    After reinstalling all of them again the site started working...

    Nothing logical.

    Thanks,

    Roy.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 22, 2013 3:45 AM

All replies

  • User-166373564 posted

    Hi roywax

    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    When you run a Microsoft .NET Framework 2.0 Remoting application, you may receive the following error message,

    Additionally, this problem may occur in .NET Framework 2.0 Remoting applications on a computer that is running certain types of driver software or antivirus programs.

    Please look at http://support.microsoft.com/kb/923028, and check whether it is helpful to fix it,

    With regards

    Friday, May 17, 2013 2:00 AM
  • User-2007097502 posted

    Hello,

    Thank you for your answer.

    I am not sure how this would help me.

    I am running an ASP.NET MVC website inside IIS with framework marked as 4.x.

    Any thoughts?

    Bye

    Friday, May 17, 2013 3:59 AM
  • User-166373564 posted

    Hi roywax

    As you mentioned above, your site on IIS suddenly stopped working with error, so I think you should check whether this is a known bug first,

    According to the error message , I would like to suggest you to refer similar threads in MSDN library, and check whether there are feasible solution for the same issue,

    #Error: Attempted to read or write protected memory, this is often an indication that other memory is corrupt.

    At the same it may be helpful for you to learn the detailed procedures of deployment of a Website on IIS, you could refer the configuration in IIS, and check whether it can give some tips for you,

    # Deployment of a Website on IIS

    http://www.codeproject.com/Articles/32210/Deployment-of-a-Website-on-IIS#_rating 

    hope it helpful to troubleshoot,

    With regards

    Sunday, May 19, 2013 11:30 PM
  • User-2007097502 posted

    Hello,

    In the end i uninstalled all visual studio(s), sql server(s), .net framework(s)

    After reinstalling all of them again the site started working...

    Nothing logical.

    Thanks,

    Roy.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 22, 2013 3:45 AM