Friday, June 1, 2018

Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()'

Hi friend today when you Update: same for mvc 4 to mvc 5. than this error is come 
Today i am also face same error so think post the same .


Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed.



Ans:-

For me this error was because I did NOT have Microsoft.AspNet.WebHelpers installed after updating from MVC 4 to MVC 5. It was fixed by installing the NuGet package


Install-Package -Id  Microsoft.AspNet.WebHelpers
I This this will help you.
Thank you ,,,,

No comments:

Post a Comment