[英]Connect to a SQL DB hosted on azure through a windows store app
I want to be able to connect to my DB on the azure platform and pull down some data from a table, using a windows store app in c#. 我希望能够使用c#中的Windows存储应用程序连接到Azure平台上的数据库并从表中提取一些数据。 I have done this before in asp.net, but I know that the libraries for this type of thing are different when using windows store app.
我之前已经在asp.net中完成了此操作,但我知道使用Windows Store应用程序时,此类事物的库是不同的。 Could anyone point me in the right direction?
有人能指出我正确的方向吗?
Thanks, 谢谢,
Callum 卡勒姆
You won't be able to connect directly to your Azure database from a Windows Store app, because a firewall prevents direct access - you need to add each IP address individually. 您将无法从Windows Store应用程序直接连接到Azure数据库,因为防火墙阻止了直接访问-您需要单独添加每个IP地址。 It would also be incredibly insecure.
这也将是非常不安全的。
Instead, create a simple API which your Windows Store app can call - use WebAPI in C# for example. 而是创建一个Windows Store应用程序可以调用的简单API,例如在C#中使用WebAPI。 You can host this on an Azure Web Site, and it can act as the gateway between your Windows Store app and the database.
您可以将其托管在Azure网站上,并且可以充当Windows应用商店应用程序和数据库之间的网关。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.