MVC 5 on Raspberry Pi using Mono - mono

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..

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

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.

Related

Symfony 6 - CAS Bundle

I am using Symfony 6 and I should use CAS bundle for my app because we use SSO system. So, can I install the following bundle while I use Symfony 6 because there is no CAS bundle for Symfony6:
https://github.com/ecphp/cas-bundle
I asked Symfony Community and I got recieved this message:
Unfortunately, I've never worked with CAS protocol before, so don't
use those bundles myself. But let me give you some hints. First of
all, I see that the bundle you linked https://github.com/ecphp/ca...
does not support Symfony 6 yet, though there's an issue about it:
https://github.com/ecphp/ca... - feel free to follow it to know when
that issue is closed. Also, if you have time - feel free to help with
upgrading that bundle and make it compatible with Symfony 6 and send a
PR - that may have a good side effect, because even if the bundle is
slow on reviewing/merging your PR - you will be able to use your
fork in your project while PR is not merged yet. Other options - you
may want to take a look at GitHub search:
https://github.com/search?o... - probably you will find that is still
maintained. If no luck - you may want to use low-level tools that are
used in those bundles to write the implementation yourself - take a
look at composer.json file to see what libs are used behind the scene
in those bundles that might help you. Or, another option - downgrade
your project to Symfony 5.4. Basically, Symfony 5.4 == 6.0, but in
Symfony 6.0 just dropped all the legacy code since 5.x version.
Though, it might work and you will be able to install that bundle, but
keep in mind that if the bundle is dead and nobody will add Symfony 6
support there - you won't be able to upgrade to the newer version at
some point.
Do you have any idea about this issue?
Thanks all :)
It seems there is a CAS bundle for Symfony 6.
Take a look to
https://packagist.org/packages/l3/cas-guard-bundle
https://packagist.org/packages/l3/cas-bundle

Multiple ASP.NET 5 apps using DNX-watch command

I was successfully able to get DNX-Watch command using ASP.NET 5 beta 8. Its great feature though my requirement is little bit more.
I have two projects ASP.NET 5 Web API project, normal Static HTML web app(like mini SPA).
What I would not achieve is running DNX-Watch command for both projects. Only one project can run at "localhost:5000" but if I want to run other project. An error is thrown "localhost:5000" already running.
What to know if DNX-watch runs against only project?
Running multiple apps on the same port is not a dnx-watch issue. You'll get the same error if you try to start the two apps by hand too. You have to a different port for each application
Currently dnx-watch supports only one startup project per watcher instance. However, you can start multiple instances of dnx-watch and you can achieve the same result. I don't think we'll add multiple startup projects support because it creates some strange complications around console input/output and environment setup.

Does ImageResizer with PdfRenderer work in asp.NET 5

I can get the image conversion working in asp.NET 5 beta 7 with manual set up as suggested in the following thread, when I convert from image to image. However, when I try to use the Pdf Renderer Plugin, it will throw an exception when trying to load the ghost script library.
Exception thrown: 'System.InvalidOperationException' in ImageResizer.dll
Additional information: Ghostscript native library for this platform not found: gsdll64.dll
The same scenario works fine in an asp.NET 4.5.x web site so I'm wondering if there using image resizer with the pdf renderer in an asp.NET 5 web site is currently a dead end due to native assembly loading issues? (I've seen a few GitHub issues in asp.NET 5 as well as repositories from Imazen that makes me believe that this might be the case.)
Dependency loading is a hopeless disaster right now in .NET. They spurned every possible x-plat solution, and left us in a dead end.
You might try P/Invoking LoadLibrary on gsdll64.dll before you call ImageResizer. This will work on a single platform (win64).
I don't think I will be supporting ASP.NET 5 until it approaches technical preview quality (the 'beta' label is strictly absurd).

Win 7, 64 bit, missing qt5widgets.dll

I'm on windows 7 64bit, trying to run some software and I am getting an error indicating that I am missing qt5widgets.dll. I tried to find this dll from different websites but didn't have any luck. Where can I find the files to resolve this dependency ?
You should contact the person who gave you the application. The necessary libraries should have been included in the distribution.
Failing that, you may want to try here you will need to get the version that the application is expecting, and potentially match the compiler that was used to build the application.
You would expect the required dll's would come bundled with the application. This application is a QT application and the aforementioned dll's can also be found at QT5 official website.

How to install protocol buffers with Objective C/iOS 5 SDK?

Does anyone know how to get protocol buffers working with the most recent version of the iOS SDK?
I tried the instructions given here: http://code.google.com/p/metasyntactic/wiki/ProtocolBuffers
I have successfully installed 'protoc' and have also successfully compiled Objective-C output files using it, but the project that it tells you to list as a dependency is outdated and I get errors when I try to build my app.
Alternatively then, does anyone know to make the project compatible with the most recent version of the SDK?
You can find the related IOS 5 arc enabled port if metasyntactic protobuf
https://github.com/regwez/protobuf-objc-iOS5
Although I am having difficulties with the generated code (repeated type fields won't compile, at least for me), it might be a starting point for you.