简体   繁体   English

通过Windows Store应用连接到Azure托管的SQL DB

[英]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.

相关问题 在Windows应用商店中连接到SQL Lite数据库 - Connect to sql lite db in windows store app 如何从Windows应用商店应用连接到SQL Azure数据库表? - How can I connect to a SQL Azure DB table from my Windows store app? 将Windows Phone 8.1 Store应用连接到现有的Azure SQL数据库 - Connect a Windows Phone 8.1 Store App to an Existing Azure SQL Database 如何从 Azure 应用服务中托管的 API 应用程序连接到 AWS 中托管的 SQL 数据库 - How to connect to SQL database hosted in AWS from API application hosted in Azure App Service 无法从Windows应用商店应用插入Azure db - Trouble inserting into Azure db from Windows Store app 从windows ce通过网络连接到pc上托管的sql server数据库 - connect to sql server database hosted on pc from windows ce through network 将 Web 应用程序 + sql db + windows 服务部署到 Azure - Deploying a web app + sql db + windows service to Azure 如何连接windows phone app使用存储在sql azure中的数据库 - How to connect windows phone app to use database stored in sql azure Azure 中托管的 Blazor 应用未连接到 Azure SignalR 实例 - Blazor app hosted in Azure does not connect to Azure SignalR instance 如何使用已在Azure中注册的应用程序使用实体框架数据库第一种方法连接到Azure SQL DB - How to connect to Azure SQL DB using entity framework database first approach using already registered app in Azure
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM