Error: Attempt by security transparent method ‘…Start()’ to access security critical method ‘..#System.String#’ failed.


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

All you need to do is to install Microsoft.AspNet.Web.Helpers.Mvc, simply use the NuGet Console and run the following command in the Package Manager Console


PM> Install-Package Microsoft.AspNet.Web.Helpers.Mvc

–I found the origional fix here

Advertisements

About Larry Louisiana

I'm a Microsoft Partner Consultant.
This entry was posted in Snippit and tagged , , . Bookmark the permalink.

One Response to Error: Attempt by security transparent method ‘…Start()’ to access security critical method ‘..#System.String#’ failed.

  1. Jerrame says:

    If working in MVC 5…

    I was creating a setup project that included the WebMartix.Data.dll and WebMatrix.WebData.dll

    These were unneeded dll’s, I excluded them from the setup dependancies and all was well.

    If you have them in your bin folder, you can remove them and see if that clears up the issue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s