嵌套的web.config变换 [英] Nested web.config transform

查看:119
本文介绍了嵌套的web.config变换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的web.config一个子目录

I have a subdirectory with a simple web.config

<configuration>
  <system.web>
    <!--<authorization>
      <allow roles="admin"/>
      <deny users="*"/>
    </authorization>-->
  </system.web>
</configuration>

我喜欢有安全的发展处于关闭状态。我喜欢做一个快速部署 - 的Alt-B-H

I like to have security turned off in development. I like to do a quick deploy - Alt-B-H

问题:我可以用我的主要web.release.config起飞的意见

Problem: Can I use my main web.release.config to take off the comments?

推荐答案

我觉得你看它周围戴夫走错了路。配置变换只能得到在发布过程,当你在本地运行,这意味着应用(我想这是你的意思是在发展中已关闭),你的web.config必须在您的本地环境的正确状态。如果你不想在auth节点本地,但你的的远程想要的话,你需要配置转变为的添加的它在web.release.config文件。

I think you're looking at it the wrong way around Dave. Config transforms only get applied in a publish process which means when you're running locally (I assume this is what you mean by "turned off in development"), your web.config needs to be in the correct state for your local environment. If you don't want the auth node locally but you do want it remotely, you'll need config transforms to add it in the web.release.config file.

这篇关于嵌套的web.config变换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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