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
Matth source share