![](/img/trans.png)
[英]How do I insert entities with a 1:n relationship in Azure App Service
[英]How do you insert a newline in an Azure App Service app setting?
在Azure App Service Web應用程序中,如何使用Azure門戶在應用程序設置中插入換行符(即\\ n)? 使用\\n
似乎不會像在C#/ json / etc中那樣逃脫。
如果不可能,建議將長字符串配置為傳遞到應用程序的建議方法是什么? 我們還在Visual Studio Team Services中使用持續集成,並且不希望在構建過程中不進行文本轉換。
我不認為Portal支持這樣做。 但是,您應該可以通過API進行操作。 例如試試這個:
"test": "1234\\n5678"
您可以通過Azure PowerShell任務來執行此操作,但只需保留換行符即可,該值不會出現在多行中,例如:
$webAppName="XXX"
$resourceGroupName="XXX"
$newAppSettings =@{"newSetting01"="newValue01";"newSetting02"="t1\nt2\n123456"}
Set-AzureRmWebApp -AppSettings $newAppSettings -Name $webAppName -ResourceGroupName $resourceGroupName
有關更新應用程序設置的文章: 使用PowerShell為Azure App Service應用/更新應用程序設置
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.