This is a migrated thread and some comments may be shown as answers.

[Solved] Getting Error - VerificationException: Operation could destabilize the runtime

14 Answers 127 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 06 Dec 2010, 01:43 PM
Using MVC3, .Net Framework V4.
The code works fine on Development Server using Casini Server, but this error occurs on IIS 6.0 server.
This is occurring in the forms authentication View.

Operation could destabilize the runtime.

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.Security.VerificationException: Operation could destabilize the runtime.

Source Error:

Line 8:      <!-- Use this to register all style sheets -->

Line 9:      <!-- Add CSS references here... -->

Line 10:     @Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group

Line 11:                 .Add("telerik.common.min.css")

Line 12:                 .Add("telerik.heartland.css")


----

    @Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group
                .Add("telerik.common.min.css")
                .Add("telerik.heartland.css")
                .Add("~/Content/CSS/Public.css")
        .Compress(true))

14 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 06 Dec 2010, 01:46 PM
Here is the complete statement where the error is occurring:


@Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group
                .Add("telerik.common.min.css")
                .Add("telerik.heartland.css")
                .Add("~/Content/CSS/Public.css")
        .Compress(true))
0
Moataz
Top achievements
Rank 1
answered on 05 Jan 2011, 10:02 AM

I am getting the same error, "Operation could destabilize the runtime.". 

Source Error:

Line 6: 
Line 7: 
Line 8: @(Html.Telerik().StyleSheetRegistrar()
Line 9:            .DefaultGroup(group => group
Line 10: 						 .Add("site.css")

Stack Trace:

[VerificationException: Operation could destabilize the runtime.]
  Telerik.Web.Mvc.Infrastructure.DI.<RegisterWebAssetDependencies>b__1e() +209
  Telerik.Web.Mvc.Infrastructure.Implementation.DependencyInjectionContainer.Resolve() +277
  Telerik.Web.Mvc.Infrastructure.Implementation.<>c__DisplayClassa`4.<Register>b__9() +291
  Telerik.Web.Mvc.Infrastructure.Implementation.DependencyInjectionContainer.Resolve() +277
  Telerik.Web.Mvc.Infrastructure.Implementation.<>c__DisplayClassa`4.<Register>b__9() +212
  Telerik.Web.Mvc.Infrastructure.Implementation.DependencyInjectionContainer.Resolve() +277
  Telerik.Web.Mvc.Infrastructure.Implementation.<>c__DisplayClass7`3.<Register>b__6() +210
  Telerik.Web.Mvc.Infrastructure.Implementation.DependencyInjectionContainer.Resolve() +277
  Telerik.Web.Mvc.UI.HtmlHelperExtension.Telerik(HtmlHelper`1 helper) +869
  ASP._Layout_cshtml.Execute() in e:\approot\_WASR_\0\Views\Shared\_Layout.cshtml:8
  System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +227
  System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +52
  System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +119
  System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +109
  System.Web.WebPages.WebPageBase.PopContext() +230
  System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +312
  System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +33
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +533
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +248
  System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +740
  System.Web.Mvc.Controller.ExecuteCore() +112
  System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +105
  System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +66
  System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
  System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +348
  System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +176

Any ideas? 

0
Atanas Korchev
Telerik team
answered on 05 Jan 2011, 10:06 AM
Hello,

 We have not been able to reproduce this problem so far. Could you provide a sample project? Just zip the application and attach it to this thread.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Moataz
Top achievements
Rank 1
answered on 05 Jan 2011, 10:30 AM
The application is very large. I will try to create a smaller one. 

In the meantime, this might be helpful: 

The application works in the asp.net development environment but not when hosted on IIS7.0. It does not work when I run it through the Windows Azure Compute Emulator which hosts it on an IIS7.0 and the exact same thing goes when it is hosted in the real cloud. 
0
Moataz
Top achievements
Rank 1
answered on 05 Jan 2011, 11:00 AM
I tried 

@(Html.Telerik().ToString())

and got the exact same error. 

The error seems to occur as soon as i try to access Telerik() when it is hosted in Windows Information Services 7.0.6000.16386 on a windows 2008 server enterprise (build 6002) machine. 

Any ideas?
0
Atanas Korchev
Telerik team
answered on 05 Jan 2011, 11:16 AM
Hello,

 We tried to reproduce this exception - to no avail. 

  1. Does the application pool of your IIS web site use the same .NET version as the Telerik.Web.Mvc.dll assembly?
  2. Are you using any modified trust level? If yes - which one?
  3. Does it work outside of Azure?


Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Moataz
Top achievements
Rank 1
answered on 05 Jan 2011, 12:38 PM
Very strange...

Answers:

1. Yes, Version 4.0.30319. 
2. All trust levels are set to full. 
3.1 It works in the asp.net development server (when running the portal project directly from visual studio).
3.2 It almost works in IIS 7.5, on my local development machine. I run it through the "Compute Emulator", which hosts it in IIS7.5. 
3.3 In Azure, it produces the error as soon as i call Telerik(). It is hosted in IIS7.0. 

We will try to create a project that demonstrates this behavior, among other things, today for you to test. 
0
David
Top achievements
Rank 1
answered on 05 Jan 2011, 01:29 PM
We resolved our problem by moving it from a server with IIS6, to one with IIS7.
0
Moataz
Top achievements
Rank 1
answered on 05 Jan 2011, 02:14 PM
Hello, 

The problem was resolved by disabling the intellitrace functionality which didn't like the telerik.web.mvc.dll when deploying to Windows Azure. 

Thank you for your support. 
0
Moataz
Top achievements
Rank 1
answered on 10 Jan 2011, 09:16 AM
The problem has been reported to Microsoft MVC team and Intellitrace team. It might be a good idea to send in a formal bug report to you. Do I need to create a support card or can you take it from here? 
0
Atanas Korchev
Telerik team
answered on 10 Jan 2011, 09:20 AM
Hello David,

We will log this for further investigation but we cannot promise that we can actually fix that. Unfortunately we are not experts in the Intellitrace area. We know that it instruments the code which seems to generate invalid IL image. 

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Will
Top achievements
Rank 1
answered on 01 Mar 2011, 12:02 AM
Hi,

Has there been any progress on this?

I just ran into this issue on an Azure application deployment. I will next attempt to run it without Intellitrace but that is NOT a good solution since it leaves us with limited traceability on other parts of the code.

FWIW, the code runs fine on MVC3 in a Windows 7 Enterprise box using IIS 7.5 in full trust mode.

The Azure box is a Windows 2008 R2 server running Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1. The site is running in a .net 4 integrated app pool. The application is running in full trust.

Any feedback on this would be greatly appreciated.

\ ^ / i l l
0
Moataz
Top achievements
Rank 1
answered on 01 Mar 2011, 06:44 AM
Hello, 

Very sorry. The only thing that helped for us was to turn off the intellitrace. 
I am really looking forward a real solution. 

Best regards
0
T. Tsonev
Telerik team
answered on 08 Mar 2011, 10:31 AM
Hello,

We were able to track down the issue down to the new security model introduced in .NET 4.0. The solution turned out to be simple enough - revert to the old security model by placing the following attribute in AssemblyInfo.cs

Copy Code
Copy Code
#if MVC3
 
[assembly: SecurityRules(SecurityRuleSet.Level1)]
 
#endif

This fix will be included in the Q1 release as well as in service releases for Q3 2010.

I hope this helps.

Best regards,
Tsvetomir Tsonev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Moataz
Top achievements
Rank 1
Atanas Korchev
Telerik team
Will
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or