我有一個ASP.NET MVC 4應用程序,這是我在OS X上使用Xamarin Studio開發的。我將其部署到運行Ubuntu Server(最新版本)的Docker容器中,其中使用單聲道3.2.8與mod_mono和apache一起安裝。Mod_Mono ASP.NET MVC 4部署問題
我已經成功地將網站配置爲在mono-server-4下運行,因爲它是.NET 4.0網站。不過,我收到以下錯誤:
[System.TypeLoadException]: Could not load type 'System.Web.Routing.RouteCollection' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at (wrapper managed-to-native) System.Reflection.MonoMethodInfo:get_method_info (intptr,System.Reflection.MonoMethodInfo&)
at System.Reflection.MonoMethodInfo.GetMethodInfo (IntPtr handle) [0x00000] in <filename unknown>:0
at System.Reflection.MonoMethodInfo.GetDeclaringType (IntPtr handle) [0x00000] in <filename unknown>:0
at System.Reflection.MonoMethod.get_DeclaringType() [0x00000] in <filename unknown>:0
at System.Web.HttpApplicationFactory.GetApplicationTypeEvents (System.Type type) [0x00000] in <filename unknown>:0
at System.Web.HttpApplicationFactory.GetApplicationTypeEvents (System.Web.HttpApplication app) [0x00000] in <filename unknown>:0
at System.Web.HttpApplicationFactory.FireEvent (System.String method_name, System.Object target, System.Object[] args) [0x00000] in <filename unknown>:0
at System.Web.HttpApplicationFactory.FireOnAppStart (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.HttpApplicationFactory.GetApplication (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.HttpRuntime.Process (System.Web.HttpWorkerRequest req) [0x00000] in <filename unknown>:0
我不知道爲什麼我得到這個錯誤,因爲我有單完成目標服務器上安裝和應用程序運行正常本地。任何幫助很多讚賞!
編輯:幾次請求後(4或5),我似乎從同一個URL獲得404。不知道這是否與之有關...