4
如何選擇註釋或使用Web.config轉換插入註釋?Web.Config轉換xml註釋
無處可以找到關於此的任何信息。
我試圖做之一: 1)在Web.config現有註釋前插入一塊XML(<serviceAuthorization impersonateCallerForAllOperations="true"/>
)的
OR
2)將在最後的註釋和XML一組兄弟姐妹的:
至於我可以告訴Web.config文件轉換不支持XPath軸,我已經嘗試了一些他們的嘗試和第一註釋前插入一個節點:
<serviceAuthorization impersonateCallerForAllOperations="true" xdt:Transform="InsertBefore(/configuration/system.serviceModel/behaviors/serviceBehaviors/behavior[@name='behaviorOne']/serviceMetadata/preceding::comment()[1])"/>
<serviceAuthorization impersonateCallerForAllOperations="true" xdt:Transform="InsertBefore(/configuration/system.serviceModel/behaviors/serviceBehaviors/behavior[@name='behaviorOne']/child::node()[1]"/>
我已經嘗試了其他幾個,但你明白了。預覽變換時我只是遇到了一個錯誤。
我似乎也無法找到關於如何插入評論的任何信息。我錯過了什麼嗎?