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") |
----
14 Answers, 1 is accepted
@Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group .Add("telerik.common.min.css") .Add("telerik.heartland.css") .Add("~/Content/CSS/Public.css") .Compress(true))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?
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
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.
@(Html.Telerik().ToString())
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?
We tried to reproduce this exception - to no avail.
- Does the application pool of your IIS web site use the same .NET version as the Telerik.Web.Mvc.dll assembly?
- Are you using any modified trust level? If yes - which one?
- Does it work outside of Azure?
Atanas Korchev
the Telerik team
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.
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.
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
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
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
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
#if MVC3[assembly: SecurityRules(SecurityRuleSet.Level1)]#endifThis 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