Replacing partitions in web.config with a web deployment project

I am trying to replace the next section with an empty section.

<secureWebPages mode="RemoteOnly" encryptedUri="abc.co.uk" unencryptedUri="www.abc.co.uk" maintainPath="True" warningBypassMode="AlwaysBypass" bypassQueryParamName="BypassSecurityWarning" ignoreHandlers="WithStandardExtensions"> <files> <add path="abc.aspx"/> </files> </secureWebPages> 

But after execution it gives me the following error

 WDP00002: missing section secureWebPages/configuration. 

Can anyone help me in this regard

+4
source share
2 answers

This error means that the section you want to replace was not found in the web.config file.

For example, read my entry in my WDP

authentication = authentication.config

However, authentication cannot be found in the root, as it is in the system.web file, so I changed it to

system.web / authentication = authentication.config

and it worked.

Please note that during debugging I tried to replace the entire system.web element, and this also did not seem to work for me - I am not sure what caused this, but if you cannot replace system.web, I suggest you try another element and see does this work e.g. connectionStrings

+2
source

So, this problem arose for me recently and until I found it, I was at a loss. It seems that web.config consists of not only sections, but also groups of sections. Now system.serviceModel, system.web, etc. They are service groups and as such cannot be replaced as a whole.

You can replace sections in a group using "section group" / "section" = x.config

Hope this helps :)

0
source

All Articles