Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you insert a newline in an Azure App Service app setting?

In an Azure App Service web app, how do you insert a newline character (ie. \n) into an app setting using the Azure portal? Using \n doesn't appear to get escaped like it would be in C#/json/etc.

If it's not possible, what is the recommended way to configure long strings of text to pass into an app? We're also using continuous integration in Visual Studio Team Services and would prefer to not get into text transformations during the build process.

like image 475
joelsand Avatar asked Jan 29 '23 07:01

joelsand


1 Answers

I don't think the Portal supports doing this. However, you should be able to do it via API. e.g. try this:

  • Go to Resource Explorer (https://resources.azure.com/)
  • Find your app (aka website), either using search box or by finding it in the tree
  • Under your app, go to config/appsettings
  • Click Edit (you may need to switch to Read/Write mode at the top)
  • Add an App Setting with a new line, e.g. "test": "1234\n5678"
  • Click POST
like image 159
David Ebbo Avatar answered Feb 23 '23 17:02

David Ebbo