Almost the same scenario as before but this time I need to upgrade an app from .NET 4.5 (MVC 4) to 4.5.2 (MVC 5.2). I'd solved the previous issue by doing it on a Win 8 machine. It didn't work on Win 7. Now, doing the same procedures (on a Win 8 machine) I have problems again.
I've followed the steps:
- Upgraded all projects to Framework 4.5.2.
- Checked for the Microsoft.AspNet.WebHelpers to uninstall it and it didn't exist.
- Did the Manage NuGet Packages for Solution... step, and upgraded Microsoft.ASPNET MVC to 5.2 and Microsoft.ASPNET Web API to 2.2.
- Edited all Web.Config files.
- I've tried the Final Steps (Unload Project...) but the GUID was already gone.
The project builds fine but when I run it I get a Server Error page:
Attempt by security transparent method
'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security
critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed.
I've tried all solutions that I found on the Net but no luck.
Is there anything else I need to do it because of the target versions 4.5.2/5.2?
UPDATE 1
Removed WebMatrix.Data and WebMatric.WebData. Now I get 403.14 error. The request hits Global.asax Application_PreRequestHandlerExecute method but it doesn't go into Application_Start.