The environment in which this error occurs: ASP. NET or XML
Case: An otherwise healthy C # page, because the SQL password has changed since the " error parsing EntityName "error, verifying that the password for SQL connectionstring for Web. config is changed. In the baffled solution, found VisualStudio (2008) Open web.config will put some two characters of the SQL password &N Red flag "undefined entity" N "", suddenly understood, because web.config is the XML content, In XML, "&" is used for defined character entities, i.e. sql ConnectionString.
FIX: Change SQL password to non-"& character" form
Attached: XML character entity
XML character Entity
As mentioned above, most of the character entities and escapes that are commonly used when writing XAML markup are defined by XML. This topic does not provide a complete list of similar entities, and more deterministic references to these entities can be found in external documents such as XML specifications. However, for the sake of convenience, this topic lists some specific XML character entities that are often used for XAML markup.
Character |
|
Entity |
Description |
& ("and" character) |
|
& |
Must be used both for the property value and for the content of the element. |
> (greater than sign character) |
|
< |
Must be used for property values, but as long as there is no < in front, you can accept > as the content of the element. |
< (less than sign character) |
|
< |
Must be used for attribute values, but as long as there is no following, you can accept < as the content of the element. |
"(double quote character) |
|
" |
Must be used for the property value, but acceptable as the content of the element. Note that the property value itself can be caused by ' or ', the property value shell is defined by the first quotation marks, and the other quotation mark can then be used as the text in the value. |
' (single quote character) |
|
' |
Must be used for the property value, but acceptable as the content of the element. Note that the property value itself can be caused by ' or ', the property value shell is defined by the first quotation marks, and the other quotation mark can then be used as the text in the value. |
(digital word mappings shot) |
|
&#[integer]; or & #x [hex]; |
XAML supports mapping numeric characters to an active encoding. |
(non-breaking spaces) |
|
& #160; (with UTF-8 encoding) |
For flow document elements or elements that use text, such as a TextBox, nonbreaking spaces are not normalized outside the markup, as are xml:space= "default" (see Whitespace processing in XAML for details). |
XML Comment Format
XAML uses the XML comment format: Comments begin with the <!--,-->, end, the note must not appear-sequence.
Source: http://blog.sina.com.cn/s/blog_6452c6b40100nbw2.html
Error: Error parsing entityname Web configuration