azure - 如何在 Azure 上为我的应用程序服务设置环境变量?

标签 azure

我制作了一个在 Azure 上发布的 Web API 服务。我希望能够从此服务写入我的 blob 存储,因此我需要为存储连接字符串添加一个环境变量。在控制台(在应用程序服务的开发工具下)中,我编写命令:

D:\home\site\wwwroot>setx AZURE_STORAGE_CONNECTION_STRING "<MyConnectionString>"

但我收到消息:

Error: Access to the registry path is denied

最佳答案

您可以导航到网络应用的配置部分,在门户中设置连接字符串,并添加名为“AZURE_STORAGE_CONNECTION_STRING”的新 key 和值

或使用 CLI command 设置连接字符串,

az webapp config connection-string set --connection-string-type {ApiHub, Custom, DocDb, EventHub, MySql, NotificationHub, PostgreSQL, RedisCache, SQLAzure, SQLServer, ServiceBus}
                                       [--ids]
                                       [--name]
                                       [--resource-group]
                                       [--settings]
                                       [--slot]
                                       [--slot-settings]
                                       [--subscription]

关于azure - 如何在 Azure 上为我的应用程序服务设置环境变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60139849/

相关文章:

azure - 将应用程序部署到 Web 应用程序后如何更改应用程序服务的主页

sql-server - 如何判断 SQL 数据库是否启用了 QUERY_STORE?

Azure:如何管理开发和生产网站

azure - 如何使用 Python Flask Api 触发 Databricks Notebook

azure - 如何在azure搜索中使用sql like子句?

c# - 获取 Azure 高级存储帐户属性

azure - 将 Cosmbos DB Sql Api 中 Container 的主键命名为不同于 "id"

Azure KQL - 在时间表之上创建总平均线

azure - 如何编写azure cosmos数据库复杂的选择查询

mysql - Windows Azure : MySQL database working with Symfony2