0

I'm trying to get an MVC 5 project running on my raspberry pi, following a guide for MVC 3. (here) I've been trying for hours straight to no avail.. I am wondering if anyone has got this going in any way, because I tried with lighttpd and nginx, but both gave errors i was unable to trace/solve..

And help on the matter is much appreciated.

Edit: When running sudo xsp4 in the folder where my mvc project resides, I get the following errors:

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

So my guess is that mono on my pi misses some dll files or cant resolve some methods of mvc5, but I am at a loss how I would go about to solve them..

Guinn
  • 1,355
  • 13
  • 29
  • Not really an answer, but you might care to know: 1) The new Pis can run Windows 10 (and for free at that), so you won't have to worry about trying to get Mono to function on any of those. 2) ASP.NET 5 (with MVC 6), is cross-platform out of the box, no Mono required. Hopefully, you'll get an answer to this question, but that at least gives you some additional options going forward. – Chris Pratt Feb 24 '15 at 16:37
  • Thanks for your reply :-) Yeah both of those would make it very easy (windows10 and asp.net 5), but unfortunatly my project has to be finished by the time they are released :( – Guinn Feb 25 '15 at 08:04

2 Answers2

2

After a lot more googling, I have found that MVC 5 simply isn't supported by debian distributions of linux (not sure about other distributions, but I assume they aren't supported either), mainly because the current version of mono doesn't support the System.web package needed for MVC 5 projects. It will probably not become compatible in the future either, because as Chris Pratt stated MVC 6 (with ASP.NET 5) will be cross platform.

MVC 4 is nearly fully supported (as you can read 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) then you might want to look into MVC 4.

I myself swapped to a windows server to host my MVC app.

Edit More info about how to install mvc 4 on your Pi can be found in this question

Community
  • 1
  • 1
Guinn
  • 1,355
  • 13
  • 29
1

As the author of the tutorial I feel I should probably chip in to be useful!. I would definitely move on to something newer e.g. the windows 10 setup. Back in the day of writing the tutorial there were lots of hacks you had to do in order to get mvc 3 working correctly via mono, let alone the headaches of soft/hard point support issues.

munkee
  • 759
  • 1
  • 9
  • 23