了解应用程序设置/配置字符串设置-使用Azure SQL Server的应用程序服务 [英] Understanding App Settings / Configuration String Setup - for App Service using Azure SQL Server

查看:76
本文介绍了了解应用程序设置/配置字符串设置-使用Azure SQL Server的应用程序服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 对于使用Azure SQL Server的ASP.NET App Service,我试图确切地了解App Settings/Configuration String功能如何将App Service连接到数据库.

 For an ASP.NET App Service using Azure SQL Server, I'm trying to understand exactly how the App Settings / Configuration String feature operates to connect the App Service to the Database.

基于这篇有用的文章:

https://www.codeproject.com/Articles/1156583/Connection-Strings-in-Azure-Application-Configurat

https://www.codeproject.com/Articles/1156583/Connection-Strings-in-Azure-Application-Configurat

似乎所需要做的只是

1)从数据库连接字符串"(Connection Strings)复制连接字符串.设置进入应用服务"/应用设置"/配置字符串"条目.

1) copy the connection string from the DB "Connection Strings" settings to the App Service/App Settings/Configuration Strings entry. 

2)然后,应用程序设置"会自动处理从那里开始的连接

2) And then the App Settings automatically handles the connections from there

3)并基于对资源的AD访问为连接字符串提供安全性,从而无需使用加密的连接字符串

3) and provide security for the connection strings, based on AD access to the resources, which removes the need for encrypted connection strings

4)并使连接字符串与Deployment Slot交换配合使用(相关主题,我在)

4) and make the connection strings work with Deployment Slot swaps (related topic, I'm on)

5),并且仍然允许通过Active Directory功能(相关主题,我打开)通过MSSMS分别访问数据库

5) and still allows separate access to the DB via MSSMS via Active Directory features (related topic, I'm on)

6),该文章还说,如果我正确命名了本地连接字符串,我仍然可以使用它们进行开发.

6) and that same article is saying that I can still use local connections strings for development, if I name them correctly.

这就是全部吗?

或者是否有其他步骤需要调整,例如在某些时候调整连接字符串?

Or are there other steps such as adjusting the connection strings at some point, that need to be taken into account?

谢谢!

推荐答案

Codequestor,

Hi Codequestor,

我将这个论坛线程重定向到Azure Web Apps,因为在该论坛中可能最好地回答了与App Services的连接字符串行为,但是,我提供了与使用Azure SQL配置Azure Active Directory有关的特定信息. 数据库+标识要使用的正确连接字符串:

I am going to redirect this forum thread to Azure Web Apps, as the connection string behavior with App Services is probably best answered in that forum but, I am providing specific information to related to configuring Azure Active Directory with Azure SQL database + Identifying the correct connection string to be used:

使用Azure Active Directory身份验证进行身份验证SQL数据库,托管实例或SQL数据仓库

配置和管理Azure Active Directory使用SQL数据库,托管实例或SQL数据仓库进行身份验证

如果导航到正在使用的Azure SQL数据库,Azure SQL数据仓库或Azure SQL托管实例数据库,如果导航到连接字符串"刀片,则会看到特定于连接(原始)的连接字符串的列表基于 在实施该技术后:

If you navigate to the Azure SQL Database, Azure SQL Data Warehouse, or Azure SQL Managed Instance Database you are working with, if you navigate to the Connection Strings Blade, you will see a list of connection specific (vanilla) connection strings based upon the technology being implemented:

在这种情况下,您会看到ADO.NET连接字符串的三个身份验证选项:

In this case, you see three authentication options for ADO.NET connection strings:

ADO.NET(SQL身份验证)
ADO.NET (SQL authentication)


这篇关于了解应用程序设置/配置字符串设置-使用Azure SQL Server的应用程序服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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