我正在 Xcode 上进行移动开发,并使用 Microsoft Azure 的托管数据库。
我注意到 Microsoft Azure 上有防火墙设置,以便添加客户端。
部署移动应用程序后,这将如何工作?数据库上的所有端口都应该打开吗?或者我需要使用网络服务吗?
最佳答案
How will this work when the mobile app is deployed? Should all ports be opened on the database? Or do I need to use Web Services?
您绝对应该不要打开所有端口,并且强烈建议不要从移动应用程序直接连接到数据库。
推荐的方法是在移动应用程序和数据库之间使用某种服务层。来自应用程序的所有请求都应发送至该服务层,该服务层将执行数据库操作。该服务层可以部署为 Azure Mobile App Service
, Azure API App Service
或 Azure Web Apps Service
中托管的 Web API .
关于azure - 微软Azure托管数据库和防火墙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43795723/