在不更改Web.config的情况下部署Web应用程序 [英] Deploy Web Application without Changing Web.config
问题描述
我的Web中有两个连接字符串。一个用于开发环境,另一个用于生产环境。现在我想要的是什么时候我选择调试模式并使用文件系统部署(发布)它应该自动采用开发连接字符串,当我选择发布和部署(发布)它应该自动采取生产连接字符串。有没有人遇到过这种情况之前??
谢谢,
Prasant
删除了伪代码块 - OriginalGriff [/ edit]
Hi,
I have two connection strings in my Web.config one is for Development environment and another one for Production environment.Now what i want is when i select Debug mode and deploy(Publish) in using File system it should automatically take Development Connection String and when i select Release and deploy(publish) it should automatically take Production connection string.Had anyone come across this situation before??
Thanks,
Prasant
[edit]Spurious code block removed - OriginalGriff[/edit]
推荐答案
这是一个通用的PITA - 看看这里:支持ASP.NET中的开发和发布web.config [ ^ ] - i我是怎么做的。
This is a general purpose PITA - have a look here: Supporting Development and Release web.config in ASP.NET[^] - it''s how I do it.
这篇关于在不更改Web.config的情况下部署Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!