question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

azure.mgmt.web update settings doesn't allow for colons

See original GitHub issue
  • Package Name: azure.mgmt.web

  • Package Version: 0.48

  • Operating System: MacOS and Ubuntu

  • Python Version: Tested on 3.6 and 3.8

Describe the bug When updating the application settings for a webapp, if one of the key-value pairs contains a colon, then the code fails

To Reproduce Steps to reproduce the behavior:

from azure.mgmt.web import WebSiteManagementClient
test = {"enjoys_roaming_the_streets": "True", "is_sleepy": "False", "owner_email": "dogdog@dog.dog", "Name": "idk Rex"}
client = WebSiteManagementClient(service_credentials, sub)
client.web_apps.update_application_settings(rg, name, properties=test)

works, but

from azure.mgmt.web import WebSiteManagementClient
test = {"enjoys_roaming_the_streets": "True", "is_sleepy": "False", "owner_email": "dogdog@dog.dog", "Name": "idk Rex", "Test:0:Test": "hi"}
client = WebSiteManagementClient(service_credentials, sub)
client.web_apps.update_application_settings(rg, name, properties=test)

does not work

Expected behavior I would like this code to work with both colons and without in the string key

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
changlong-liucommented, Oct 10, 2020

Hi service team, I get below error with @HarleyB123 's code from REST call response, would you confirm colon is allowed or not? Thanks.

'{"Code":"BadRequest","Message":"AppSetting with name \'Test:0:Test\' is not allowed.","Target":null,"Details":[{"Message":"AppSetting with name \'Test:0:Test\' is not allowed."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"04072","MessageTemplate":"AppSetting with name \'{0}\' is not allowed.","Parameters":["Test:0:Test"],"Code":"BadRequest","Message":"AppSetting with name \'Test:0:Test\' is not allowed."}}],"Innererror":null}'
0reactions
HarleyB123commented, Dec 8, 2020

Can close this.

For anyone using the SDK that comes across this in the future - this app settings issue is present on Linux App Services. Windows app services should work with the SDK (not tested, I personally moved over to use the REST API with Python).

If you need to use colons in Linux App Settings - you can replace the colon with a double underscore and it should work the same - so:

test:0:test

becomes

test__0__test
Read more comments on GitHub >

github_iconTop Results From Across the Web

App setting name in ARM template won't allow colon (:)
I'm trying to get an ARM template to deploy an Azure Web App for me. The Web App should ...
Read more >
Azure Key Vault configuration provider in ASP.NET Core
Hierarchical values (configuration sections) use -- (two dashes) as a delimiter, as colons aren't allowed in key vault secret names.
Read more >
Device restriction settings for Windows 10/11 in Microsoft Intune
See a list of all the settings and their descriptions for creating device restrictions on Windows 10/11 client devices.
Read more >
Manage update configuration settings - Azure - Microsoft Learn
The article describes how to manage the update settings for your Windows and Linux machines managed by Update management center (preview).
Read more >
Configure apps - Azure App Service - Microsoft Learn
To add a new app setting, click New application setting. To edit a setting, click the Edit button on the right side. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found