我是这种转换的新手,我不完全了解如何实现它。这些指南都没有意义。
我要补充
<identity impersonate="true" userName="asecret" password="mysecurepassword"/>
到发布配置。
我把它放在 web.release.config 中 <system.web>
之后但它不会这样生成。
你还想做什么。
最佳答案
您可能错过了使用 xdt:Transform
进行的实际操作属性。
尝试:
<identity impersonate="true" userName="asecret" password="mysecurepassword" xdt:Transform="Insert"/>
Insert
应将新元素添加到 <system.web>
下的 web.config 中部分。
如果<identity />
元素已经存在于主 web.config 文件中,您可能需要使用 xdt:Transform="Replace"
这会将主 web.config 中的整个元素替换为 Web.Release.config 中的元素。或者你可以使用 xdt:Transform="SetAttribute({comma listed attributes to set here})"
,这将设置您指定的属性的值。
与往常一样,您可以在 MSDN 上阅读所有转换选项。 .
关于asp.net-mvc - 创建发布 web.config 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19274036/