Attempt by security transparent method 'System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()' to access security critical method 'System.Web.WebPages.ApplicationPart..ctor(System.Reflection.Assembly, System.String)' failed.
I am getting this error, quite often. I am working on MVC5, .Net framework 4.5. I build the solution, and run the application it runs fine. I make some changes in code, build and then run the application, it runs fine. Then again i change some code and run, it give me this error.
I cant figure out the reason, because it occurs randomly at any time.
I also googled, and found that change the web.config and edit the debug flag or edit some other config sections.
The problem is it runs for few times and then give this error.
I am using Windows 8, MVC version 5.1.0.0 dll
[Update]: Uploading screenshot of call stack.
