简体   繁体   English

Windows Azure云服务asp.net配置文件更改

[英]Windows Azure cloud service asp.net config file changes

I have deployed my asp.net web site using cloud service. 我已经使用云服务部署了asp.net网站。 I have deployed it by publishing from Visual studio. 我已经通过从Visual Studio发布来部署了它。

problem is every time if i have to make changes to web.config, i have to redeploy from visual studio. 问题是每次我必须对web.config进行更改时,都必须从Visual Studio中重新部署。

Is there anyway we can directly modify from windows azure? 无论如何,我们可以直接从Windows天蓝色修改吗? I don't want every time developer should involve in this. 我不希望开发人员每次都参与其中。

Instead of defining your settings in web.config file, you should define them in Service Configuration File (*.cscfg) . 与其在web.config文件中定义设置, Service Configuration File (*.cscfg)Service Configuration File (*.cscfg)定义它们。 Then you should be able to change the values from Azure Portal and other means without redeploying your code. 然后,您应该能够从Azure门户和其他方式更改值,而无需重新部署代码。

At any cost, stay away from making web.config changes in the deployed code (using RDP or some other means) . 不惜一切代价, 不要在已部署的代码中更改web.config(使用RDP或其他方式) If for some reason Azure decides to deploy your code in other VM, your changes will be lost. 如果由于某种原因Azure决定在其他VM中部署您的代码,则所做的更改将丢失。 See this thread for more details: Azure Webrole loads old website version after restart . 有关更多详细信息, 请参见此线程: Azure Webrole在重新启动后加载旧网站版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM