如何设置对web.config中积聚到多环境没有code的变化? [英] How to setup web.config for build to multi-environments without code changes?

查看:84
本文介绍了如何设置对web.config中积聚到多环境没有code的变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在一个非常有趣的工作环境上的应用程序。有6或7此应用程序并行的水平,只有1号2级能由开发者感动。由于公司政策的所有作品都做了蒂沃利包,以及非常复杂的设置的一部分。

I recently worked on an app in a very interesting environment. There was 6 or 7 parallel levels for this application and only the 1st 2 levels were able to be touched by developers. As part of the company policy all builds were done as Tivoli packages, and very complex to setup.

最后踢球是,没有code允许更改过去的1级或开发的服务器,这样的web.config包含环境变量的多重加密部分。该应用程序是建立在感知IIS什么样的环境及其对路径和变量设置。

The final kicker was that no code changes are allowed past the 1st level or "Dev" servers so web.config contained multiple encrypted sections of environment variables. The application is built to sense what environment its on by path and variables set in IIS.

这是一个野兽,保持这样究竟是什么类型的问题?

This is a beast to maintain so what is a simple or better architecture for this type of problem?

推荐答案

ASP.NET的最新版本现在支持web配置转换,让您在项目部署,测试或分期中更改特定设置。这里是一个伟大的<一个href=\"http://thomashundley.com/post/2010/05/19/Webconfig-Transforms-Easy-Multi-Environment-Deployments.aspx\"相对=nofollow>由汤姆·亨德利前奏。

The latest version of ASP.NET now supports web config transformations, allowing you to change specific settings within your project for deployment, testing or staging. Here's a great intro by Tom Hundley.

这篇关于如何设置对web.config中积聚到多环境没有code的变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆