[英]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? 是否可以在Windows 10手机/平板电脑上运行基于自托管(Owin)的Asp.Net Web API? I would like to use mobile/tablet as a server for Asp.Net Web API which I already developed.
我想使用移动/平板电脑作为我已经开发的Asp.Net Web API的服务器。
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".
由于Windows 10移动版具有一个“设备门户”,其中包括一组REST资源,这些资源位于网络中设备IP上,因此答案似乎是“可以,是可能的”。 But I'm afraid this facility is implemented as a (sort-of) modified WCF service.
但我担心这个工具是作为(一种)修改的WCF服务实现的。 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.
它不需要常规的HTTP服务器,这对于资源受限的设备来说是过度的,但是为了响应REST请求而发出HTTP文档。 Perhaps you can design your own, keeping in mind that the concept of "service" is not available in Windows Mobile.
也许您可以自己设计,请记住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.
为了避免将您的应用放在前台,您必须对UWP中的“后台任务”进行一些研究,文档在几周前刷新(请参阅https://msdn.microsoft.com/en-us/windows/ uwp / launch-resume / support-your-app-with-background-tasks )但是,这些似乎是为轻量级应用程序设计的。 But perhaps you could design an HTTP listener in your application, generate the required documents and return them to the caller.
但也许您可以在应用程序中设计HTTP侦听器,生成所需的文档并将它们返回给调用者。 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.
我很确定Project Katana不能包含在UWP解决方案中,但我建议您快速阅读这个主题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.