Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you update the web.config file for an Azure web app without redeploying?

I would like to update a database connection string in the web.config file for an application that is currently hosted in Azure as a web app.

Seems that you can RDP into an Azure cloud service role but not a web app. If you can't RDP into an Azure web app, is there another way to update the connection string without redeploying?

like image 369
dhughes Avatar asked Oct 25 '16 05:10

dhughes


2 Answers

You can use the portal, there is a tool called "App Service Editor" in preview that lets you edit any of the files you've deployed. I do wonder why you want to do this though, it's not considered good practice to modify source files on the fly like this! Config and app settings are exposed via the portal as well and can be modified without dropping to the app service editor tool. (under Settings/Application Settings in portal). Updating these does not update the web.config but will override web.config settings.

like image 141
Russell Young Avatar answered Sep 19 '22 12:09

Russell Young


As Russell Young said, on Azure portal, we could use App Service Editor that provides an in-browser editing experience for our App code. And we could specify connection string in App settings section to override existing settings.

enter image description here

Besides, we could also to access and update Web.config file (under D:\home\site\wwwroot folder) via Kudu Debug console.

enter image description here

like image 21
Fei Han Avatar answered Sep 20 '22 12:09

Fei Han