简体   繁体   中英

Self Hosted (Owin) based Asp.Net Web API on Windows 10 mobile phone

Is it possible to run Self Hosted (Owin) based Asp.Net Web API on Windows 10 mobile phone/tablet? I would like to use mobile/tablet as a server for Asp.Net Web API which I already developed.

Good question. Since Windows 10 Mobile features a "device portal", which comprises a set of REST resources which are located in the network at the device IP, an answer seems to be "yes, is possible". But I'm afraid this facility is implemented as a (sort-of) modified WCF service. It doesn't need a regular HTTP server, which would be overkill for a resource-constrained device, but emits HTTP documents in response to REST requests. Perhaps you can design your own, keeping in mind that the concept of "service" is not available in Windows Mobile. In order to avoid keeping your app in foreground, you must perform some little research on "background tasks" in UWP, documentation was refreshed a couple of weeks ago (see https://msdn.microsoft.com/en-us/windows/uwp/launch-resume/support-your-app-with-background-tasks ) However, these ones seem to be designed for lightweight applications. But perhaps you could design an HTTP listener in your application, generate the required documents and return them to the caller. I'm pretty sure that Project Katana cannot be included in an UWP solution, but I would recommend a quick reading on the subject as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM