3

Context:

I'm currently on application including many subproject based on .NET Standard (for Xamarin).

This application need to run Kestrel Web Server to expose an API (application must be callable from external to receive updated datas).

So, I have created an ASP.NET Core project permitting to make easily a WebApi and run a server (Kestrel). Problem, It's a .NET Core project and it's incompatible with Xamarin.

Objectives:

  • The application must be callable from external (expose an API)
  • The application must used .NET Standard Projects (compatibility with Xamarin)
  • The application must run on desktop and mobile

Questions:

  • Will WebAPI included in futures releases of .NET Standard?
  • Does it seems complicated to expose an API (and so, run a server) in mobile app (and not a good practice by the way)?
  • Is there any other way to do this work?
1
  • blog.lextudio.com/… Your context is invalid by saying "many subjects based on .NET Standard (for Xamarin)". Don't invent your own terms, and show exactly what they are in Visual Studio. A screen shot can save a thousand words as well. Commented Sep 27, 2018 at 17:13

1 Answer 1

1

Objectives:

•The application must be callable from external (expose an API)

Get a web server serving as middle man and passing the request it got from external then it should be doable

•The application must used .NET Standard Projects (compatibility with Xamarin)

Web API runs on server and Xamarin runs on mobile/Desktop, Xamarin shouldn't have to worry about what tech stack the server uses as long as it complies with the protocol both agrees on (http)

•The application must run on desktop and mobile

Not an issue

Questions:

•Will WebAPI included in futures releases of .NET Standard ?

Definitely yes.

•Does it seems complicated to expose an API (and so, run a server) in mobile app (and not a good practice by the way) ?

Totally wrong way to do it. your app will lost internet connection whenever the phone decides to sleep for a while plus the phone is just not designed to serve as a server.

•Is there any other way to do this work?

Get a real cloud server instead and run your API there.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.