简体   繁体   中英

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#. 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. 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. It would also be incredibly insecure.

Instead, create a simple API which your Windows Store app can call - use WebAPI in C# for example. You can host this on an Azure Web Site, and it can act as the gateway between your Windows Store app and the database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM