Self hosted web service within winrt application?

时间:2015-09-01 21:48:37

标签: .net windows-runtime

The native winrt pieces have some great functionality.

But, from our experience, it is not possible to publish a winrt application as a COM server.

So if we build a winrt application, and want to package it to call it from a C#/.NET application, what are our options?

(The calling code will be in IIS/ASP.NET... we can call out to web service, to zeromq endpoint... maybe even out of process COM... or .NET remoting... but what can we put in the winrt application to make it call-able?)

1 个答案:

答案 0 :(得分:1)

对于Windows 10,您有一个可能对您感兴趣的新选项:

您可以创建应用服务。这基本上是一个应用程序,可以由另一个应用程序启动,并根据请求执行一些预定义的功能,而不会出现在UI上。它并不总是运行,它只在另一个应用程序调用它时才开始运行。 在引擎盖下,应用服务是一个实现由appservicetrigger触发的后台任务的应用。在此处查找有关应用服务的更多信息:https://msdn.microsoft.com/en-us/library/windows/apps/mt187314.aspx

桌面应用程序(例如WPF应用程序)也可以调用这些应用程序服务。以下是WPF应用调用的应用服务示例:https://aruntalkstech.wordpress.com/2015/07/20/calling-an-app-service-from-a-wpfwinforms-win32-app/