3

I've created .NET 4.5 WebAPI Project in VS 2013 with Individual accounts membership (template with BS, EF, API help page). Now I'm trying to port it to mono 4.0.3. I opened it in Xamarin Studio, the application was compiled and launched. However no matter what the route I query the result is enter image description here

After some googling it appeared that some code there uses IIS-specific features, but I didn't understand exactly what they are.

I'd like to make the app with modern approach but sticking to OWIN and ASP.NET Identity is not crucial. It will be SPA with pure HTML5+JS client.

What exactly should I rewrite to make my web api truly cross-platform?

Orif Khodjaev
  • 1,080
  • 1
  • 13
  • 34
  • You will have to debug further to see which part of your app attempts to access the response message's headers. That's something on IIS integrated pipeline mode supports. – Lex Li Nov 15 '15 at 13:42
  • 1
    Usually anywhere that you are using authenticate with Microsoft.Owin.Host.SystemWeb is going to trip you up. Once you are dependent on the `Microsoft.Owin.Host.SystemWeb` package being server agnostic is out. – SushiHangover Nov 15 '15 at 15:07
  • I am having exactly the same error message. I'm trying to run on Xamarin a project created with Visual Studio. No idea how to solve it. – Pedro Corso Oct 20 '17 at 19:20
  • 1
    @PedroCorso I didn't solve that issue and ditched that idea of porting apps generated by Visual Studio on Xamarin. If you want a truly cross-platform Mono compatible web application, create it in Xamarin and check if it runs on XSP4 every time you add a new assembly into your project. It will be 100x better if you don't trust auto-generated code and write exactly what you need by yourself. VS templates are too opinionated sometimes. But if it's a new project, it'd be perfect if you used .NET Core instead. It's 2017. – Orif Khodjaev Oct 20 '17 at 19:32
  • @PedroCorso BTW if you also use OWIN in your app, be sure that you make it self-hosted, otherwise it isn't possible to make it cross-platform. – Orif Khodjaev Oct 20 '17 at 19:38

0 Answers0