2014-07-06 76 views
1

差不多相同scenario as before但這一次我需要將應用程序從.NET 4.5(MVC 4)升級到4.5.2(MVC 5.2)。我在Win 8機器上解決了上一個問題。它在Win 7上不起作用。 現在,執行相同的程序(在Win 8機器上),我再次遇到問題。從.NET 4.5 MVC 4升級到.NET 4.5.2 MVC 5.2

我已經followed the steps

  1. 升級後,所有項目框架4.5.2。
  2. 檢查Microsoft.AspNet.WebHelpers卸載它,它不存在。
  3. 做了管理的NuGet包解決方案...一步,升級Microsoft.ASPNET MVC 5.2和Microsoft.ASPNET的Web API至2.2。
  4. 編輯所有Web.Config文件。
  5. 我試過最後的步驟(卸載項目...)但GUID已經消失。

該項目建立罰款,但是當我運行它,我得到一個服務器錯誤頁:

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

我已經試過了我在網絡上,但沒有運氣找到的所有解決方案。

由於目標版本4.5.2/5.2,我還需要做些什麼嗎?

UPDATE 1

移除WebMatrix.Data和WebMatric.WebData。現在我得到403.14錯誤。該請求命中Global.asax Application_PreRequestHandlerExecute方法,但它不會進入Application_Start。

+0

你實際使用WebMatrix嗎?我之前已經將WebMatrix包添加到了我的項目中,但沒有意識到它或者打算讓它們在那裏。 –

+0

是的,我有WeMatrix.Data和WebMatrix.WebData,我不使用WebMatrix。我刪除了它們。現在,我收到HTTP錯誤403.14 - 禁止的錯誤。該請求根本不會觸及Global.asax。 – user2178726

+0

你見過這個:http://stackoverflow.com/questions/11425574/mvc4-http-error-403-14-forbidden –

回答

1

我解決了它。我在項目中使用Fluent Validation,並沒有將FluentValidation.MVC4更新爲MVC5。