1

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:

  1. Upgraded all projects to Framework 4.5.2.
  2. Checked for the Microsoft.AspNet.WebHelpers to uninstall it and it didn't exist.
  3. Did the Manage NuGet Packages for Solution... step, and upgraded Microsoft.ASPNET MVC to 5.2 and Microsoft.ASPNET Web API to 2.2.
  4. Edited all Web.Config files.
  5. 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.

Community
  • 1
  • 1
user2178726
  • 95
  • 1
  • 3
  • 8
  • Are you actually using WebMatrix? I've have had WebMatrix packages get added to my projects before without realizing it or intending for them to be there. – David Tansey Jul 06 '14 at 22:22
  • Yes, I have WeMatrix.Data and WebMatrix.WebData and I don't use WebMatrix. I've removed them. Now, I get the HTTP Error 403.14 - Forbidden error. The request doesn't hit the Global.asax at all. – user2178726 Jul 06 '14 at 22:57
  • Have you seen this one: http://stackoverflow.com/questions/11425574/mvc4-http-error-403-14-forbidden – David Tansey Jul 06 '14 at 22:59
  • Yes. I've tried to include the modules setup lines in the web.config. No luck. I run the app with the VS 2013 built in server and I'm not sure how to reset ASP.NET on it or check the app pool. – user2178726 Jul 07 '14 at 02:19

1 Answers1

1

I've solved it. I use Fluent Validation in the project and didn't update FluentValidation.MVC4 to MVC5.

user2178726
  • 95
  • 1
  • 3
  • 8