Raspberry Pi 上的 MVC 5 使用 Mono
MVC 5 on Raspberry Pi using Mono
我正在尝试按照 MVC 3 指南在我的 raspberry pi 上获得一个 MVC 5 项目 运行。(here)我已经连续尝试了几个小时无济于事..我想知道是否有人以任何方式解决了这个问题,因为我尝试使用 lighttpd 和 nginx,但都给出了我无法 trace/solve..
的错误
非常感谢对此事的帮助。
编辑:
当我的mvc项目所在的文件夹中运行 sudo xsp4时,出现以下错误:
Missing method System.Web.HttpApplication::RegisterModule(Type) in assembly /usr/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll, referenced in assembly /tmp/root-temp-aspnet-0/eaee30a1/assembly/shadow/df4b0596/c32d4b8e_1c664e18_00000001/Microsoft.Owin.Host.SystemWeb.dll
Could not load signature of Microsoft.AspNet.Identity.IClaimsIdentityFactory`2[TUser,TKey]:CreateAsync due to: Failed for unknown reasons.
Could not load signature of Microsoft.AspNet.Identity.IClaimsIdentityFactory`2[TUser,TKey]:CreateAsync due to: Failed for unknown reasons.
Invalid type Microsoft.Owin.Security.AuthenticationTicket for instance field Microsoft.Owin.Security.Notifications.SecurityTokenValidatedNotification`2[TMessage,TOptions]:<AuthenticationTicket>k__BackingField
Could not load signature of Microsoft.AspNet.Identity.UserManager`2[TUser,TKey]:GetClaimsAsync due to: Failed for unknown reasons.
Invalid type test.ApplicationUserManager for instance field test.Controllers.AccountController:_userManager
Invalid type test.ApplicationUserManager for instance field test.Controllers.ManageController:_userManager
所以我的猜测是我的 pi 上的 mono 丢失了一些 dll 文件或无法解析 mvc5 的某些方法,但我不知道如何解决它们..
经过大量谷歌搜索后,我发现 linux 的 debian 发行版根本不支持 MVC 5(不确定其他发行版,但我认为它们也不支持),主要是因为当前版本的单声道不支持 MVC 5 项目所需的 System.web 包。它可能在未来也不会变得兼容,因为正如 Chris Pratt 所说的那样,MVC 6(ASP.NET 5)将是跨平台的。
MVC 4 几乎完全受支持(如您所见here), so if you for any reason need to make a MVC project on a Raspberry Pi before ASP.NET 5 hits (or if you don't feel comfortable using an alpha version of vNext + VS2015 as described: here),那么您可能想研究一下 MVC 4。
我自己切换到 windows 服务器来托管我的 MVC 应用程序。
编辑
有关如何在您的 Pi 上安装 mvc 4 的更多信息,请参见 in this question
作为本教程的作者,我觉得我应该参与其中才能发挥作用!。我肯定会转向更新的东西,例如windows 10 设置。回到编写教程的那一天,为了让 mvc 3 通过单声道正常工作,您必须做很多 hack,更不用说令人头疼的 soft/hard 点支持问题了。
我正在尝试按照 MVC 3 指南在我的 raspberry pi 上获得一个 MVC 5 项目 运行。(here)我已经连续尝试了几个小时无济于事..我想知道是否有人以任何方式解决了这个问题,因为我尝试使用 lighttpd 和 nginx,但都给出了我无法 trace/solve..
的错误非常感谢对此事的帮助。
编辑: 当我的mvc项目所在的文件夹中运行 sudo xsp4时,出现以下错误:
Missing method System.Web.HttpApplication::RegisterModule(Type) in assembly /usr/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll, referenced in assembly /tmp/root-temp-aspnet-0/eaee30a1/assembly/shadow/df4b0596/c32d4b8e_1c664e18_00000001/Microsoft.Owin.Host.SystemWeb.dll
Could not load signature of Microsoft.AspNet.Identity.IClaimsIdentityFactory`2[TUser,TKey]:CreateAsync due to: Failed for unknown reasons.
Could not load signature of Microsoft.AspNet.Identity.IClaimsIdentityFactory`2[TUser,TKey]:CreateAsync due to: Failed for unknown reasons.
Invalid type Microsoft.Owin.Security.AuthenticationTicket for instance field Microsoft.Owin.Security.Notifications.SecurityTokenValidatedNotification`2[TMessage,TOptions]:<AuthenticationTicket>k__BackingField
Could not load signature of Microsoft.AspNet.Identity.UserManager`2[TUser,TKey]:GetClaimsAsync due to: Failed for unknown reasons.
Invalid type test.ApplicationUserManager for instance field test.Controllers.AccountController:_userManager
Invalid type test.ApplicationUserManager for instance field test.Controllers.ManageController:_userManager
所以我的猜测是我的 pi 上的 mono 丢失了一些 dll 文件或无法解析 mvc5 的某些方法,但我不知道如何解决它们..
经过大量谷歌搜索后,我发现 linux 的 debian 发行版根本不支持 MVC 5(不确定其他发行版,但我认为它们也不支持),主要是因为当前版本的单声道不支持 MVC 5 项目所需的 System.web 包。它可能在未来也不会变得兼容,因为正如 Chris Pratt 所说的那样,MVC 6(ASP.NET 5)将是跨平台的。
MVC 4 几乎完全受支持(如您所见here), so if you for any reason need to make a MVC project on a Raspberry Pi before ASP.NET 5 hits (or if you don't feel comfortable using an alpha version of vNext + VS2015 as described: here),那么您可能想研究一下 MVC 4。
我自己切换到 windows 服务器来托管我的 MVC 应用程序。
编辑 有关如何在您的 Pi 上安装 mvc 4 的更多信息,请参见 in this question
作为本教程的作者,我觉得我应该参与其中才能发挥作用!。我肯定会转向更新的东西,例如windows 10 设置。回到编写教程的那一天,为了让 mvc 3 通过单声道正常工作,您必须做很多 hack,更不用说令人头疼的 soft/hard 点支持问题了。