Forum Discussion

A29968's avatar
13 years ago

ASP.NET - Operation could destabilize the runtime

Everytime I try to profile my asp.net application (within IIS), I get the following error on the web browser:



An unexpected error occured.

Please contact your administrator.



Error Message:

Operation could destabilize the runtime.



Request Url:

http://localhost/SaaSClient/Forms/FPLogin.aspx



Referrer Url:

http://localhost/SaaSClient/



I run Windows 2008 R2 32 Bits
  • googleid_111838's avatar
    googleid_111838
    Occasional Contributor
    I have found that this error disappears after I excluded the following line from execution:

    "referencedAssemblyName.FullName"

    when it refers to the 'mscorlib' assembly. For this assembly, I used the 'AssemblyName.Name == "mscorlib" comparision instead of the "AssemblyName.FullName" property.
  • Hi,


    Does the same error occur if you run your application outside AQtime?


    Which version of AQtime are you using?


    To solve the problem, you can try disabling User Account Control (UAC) on your Windows 2008 computer.

  • googleid_111838's avatar
    googleid_111838
    Occasional Contributor
    I have encountered this issue too:


    [VerificationException: Operation could destabilize the runtime.]
    System.Web.WebPages.Deployment.PreApplicationStartCode.Start() +11

    [InvalidOperationException: The pre-application start initialization method Start on type System.Web.WebPages.Deployment.PreApplicationStartCode threw an exception with the following error message: Operation could destabilize the runtime..]
    System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +1031
    System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +238
    System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +168
    System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1037

    [HttpException (0x80004005): The pre-application start initialization method Start on type System.Web.WebPages.Deployment.PreApplicationStartCode threw an exception with the following error message: Operation could destabilize the runtime..]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +683
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +176
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +797


    I am using aqtime v8.0.264.7 on Windows8.

    I started aqtime "as administrator" and tried to set UAC to "never notify" but the error remains.

    My target app is designed for FW4.0. I published it on the local IIS and it is started successfully without AQTime. I tried both 'ASP.NET' and 'IIS' options in aqtime, the error occurs always.

    Does aqtime designed to profile ASP.NET FW 4.0 applications or should I use another tool to profile my app?
  • googleid_111838's avatar
    googleid_111838
    Occasional Contributor
    I have tried aqtime with another application and it failed with the same error.

    I have changed profiler to 'Normal' and used WebDev.WebServer40.EXE to start my application and it fails with the same error when opening the startup page.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Dan,


     


    As far as I know, the "Operation could destabilize the runtime" error is related to AQtime's .NET code instrumentation mechanisms. Try attaching to the working process - in this case, the .NET code won't be instrumented, and the problem may not occur.


     


    Actually, this error is not normal, and our AQtime Support team would like to investigate it. The issue is that they can't investigate the problem without a sample app demonstrating it - the problem does not appear in any ASP.NET application they have at hand. Could you send a copy of your app for investigation?


     

  • googleid_111838's avatar
    googleid_111838
    Occasional Contributor
    Somehow this issue disappears: I have uninstalled AQtime, restarted my computer and installed it again. After this, AQtime successfully profiled the same application (same binaries) that I started using the same webdev (the same executable).