錯誤訊息:Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()'的解決方法

  • 938
  • 0

錯誤訊息:Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()'的解決方法

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

 

面對上述的錯誤訊息,解決方法如下:

PM>install-package Microsoft.AspNet.WebHelpers

參考資料來源:

[1]Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()'
http://stackoverflow.com/questions/17926552/attempt-by-security-transparent-method-webmatrix-webdata-preapplicationstartcod