[UWP] [WCF]捆绑WCF服务以及UWP应用 [英] [UWP] [WCF] Bundle WCF service along with UWP app

查看:160
本文介绍了[UWP] [WCF]捆绑WCF服务以及UWP应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!

我意识到我们无法从UWP应用程序直接访问SQL Server数据库,并且必须使用WCF服务作为调解器。 (这是完全愚蠢的,因为即使是像MySQL这样的竞争对手也会提供价格为b $ b 微软的运行时的API,而微软自己的RDBMS则没有!)

I realize that we cannot directly access SQL Server database from a UWP app, and have to use a WCF service as a mediator for this. (Which is totally stupid, since even competitors like MySQL provides API for Microsoft's runtime, while Microsoft's own RDBMS does not!)

我不喜欢有任何WCF经验,但经过一些教程后,我相信我可以建立一个WCF服务与我的SQL Server进行通信(虽然我不喜欢让我的简单应用程序使用3层架构,这不应该是对我征收b $ b)。无论如何,我不想在我的网站上托管这个WCF服务,因为我只为这个UWP应用程序做这个。有没有办法可以捆绑/打包这个WCF服务以及UWP应用程序本身,这样服务只在启动我的应用程序时在客户端计算机上运行
,并在应用程序后停止关闭/暂停/缩小。

I don't have any experience with WCF, but after going through some tutorials, I believe I can make a WCF service to communicate with my SQL Server (although I do not like making my simple application use a 3-tier architecture, which shouldn't be imposed on me). Anyways, I do not want to host this WCF service on my website, since I'm making this only for this UWP app. Is there a way I can bundle/pack this WCF service along with UWP app itself, such that service runs on client machine only when thhe start my app, and stops later when app is closed/suspended/minized.

我正在开发的UWP应用程序,也有WPF版本和网络版本(在&span; = span style ="line-height:16.3636px" > ASP.NET),所有这些都连接到MySQL数据库,直到现在,它完美无瑕。最近我决定转向SQL Server
,因为我正在使用Microsoft技术来处理我的所有软件和思想  SQL Server将有更好的集成和支持。但现在我发现它相反,并且想要切换回MySQL数据库。

The UWP app I'm developing, also have a WPF version and a web version (in ASP.NET), all of which were connected to MySQL database till now, and it worked flawless. Recently I decided to shift to SQL Server since I'm using Microsoft technologies for all my softwares and thought SQL Server will be have better integration and support. But now I find it rather opposite, and thinking to switch back to MySQL database.

- Prateek Jain

- Prateek Jain

推荐答案

如果您通过商店分发应用程序,则无法包含WCF服务等桌面组件。通常你会把它放在你的网站上,而不是试图把它与你的应用程序混在一起。

If you are distributing your app through the store then you cannot include desktop components like a WCF service. Typically you'd put that on your web site rather than trying to lump it with your app.

如果你是侧载,那么你可以像安装一样安装桌面组件任何其他桌面组件。请参阅以下白皮书,了解侧载应用与桌面组件的通信:

If you are side-loading then you can install desktop components the same as you'd install any other desktop component. See the following whitepapers for side-loaded apps to communicate with desktop components:



这篇关于[UWP] [WCF]捆绑WCF服务以及UWP应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆