slow-cheetah icon indicating copy to clipboard operation
slow-cheetah copied to clipboard

Is it possible to use Transfrom:Insert inside the Transfrom:Remove ?

Open bilalcorbacioglu opened this issue 6 years ago • 0 comments

Hi everyone,

You will see my base config file,

<security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="524288000" />
      </requestFiltering>
</security>

The first step, I want to add these lines, I am using xdt:Transform="Insert"

<security>
   ...
   <ipSecurity xdt:Transform="Insert">
		...
        <add ipAddress="XXX.XXX.XXX.XXX" allowed="true" />
        <add ipAddress="XXX.XXX.XXX.XXX" allowed="false" />
		...
   </ipSecurity>
</security>

It's working, so after that, I want to use Remove, like this;

<security xdt:Transform="Remove">
   ...
   <ipSecurity xdt:Transform="Insert">
		...
        <add ipAddress="XXX.XXX.XXX.XXX" allowed="true" />
        <add ipAddress="XXX.XXX.XXX.XXX" allowed="false" />
		...
   </ipSecurity>
</security>

But these lines not working, Error:

  • No element in the source document matches '/configuration/system.webServer/security/ipSecurity'

I can't understand that, which one starts firstly "Remove" or "Insert"? Is there any solution for that?

bilalcorbacioglu avatar Feb 25 '19 14:02 bilalcorbacioglu