The Configuration Section Cannot Contain a CDATA or Text Element

The Configuration Section Cannot Contain a CDATA or Text Element

Ok, you have got an error message "The configuration section cannot contain a CDATA or text element" announced from a C# application while you're debugging on Visual Studio.

If you search this error message on search engines, you will see that there is not any useful advice that would help you to solve the issue.

However, the solution is not a complex one.

Probably, you have mistakenly done a rogue key-press in App.config (web.config) file and save it.

Check the folowing example:

<configuration>
  <appSettings>
    <add key="SomeKey" value="Some Value"/>s
  </appSettings>
</configuration>

The developer tries to add a new key ("SomeKey") to appSettings of App.Config file. After that, he/she tries to save the file by clicking Ctrl+S. But, he mistakenly adds an "s" character to the file.

Such an edit throws the mentioned error message.

So, check your app.config (web.config) file, to find a phrase that breaks down the xml standards.

I hope, this will solve your "The Configuration Section Cannot Contain a CDATA or Text Element" problem.


The Configuration Section Cannot Contain a CDATA or Text Element
added 3 years 5 months ago

- The Configuration Section Cannot Contain a CDATA or Text Element
- What is horsepower? Kw hp conversion
- A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.ServiceModel.dll
- A first chance exception of type 'System.ServiceModel. CommunicationObjectAbortedException' occurred in System.ServiceModel.dll
- System.AccessViolationException: Attempted to read or write protected memory
- How to download attachments from outlook
- How to add Startup items to Windows 8
- How to forward IP-Port on Windows Machine
- There's more than one way to do it (TMTOWTDI)
- Don't repeat yourself (DRY)