正在获取错误错误“未定义实体'J'”

dev*_*v02 1 .net c# asp.net

我在app.config文件中有这行:

<add key="MY_KEY" value="}N7+6}s&J*?C" />
Run Code Online (Sandbox Code Playgroud)

但是,它会产生以下错误:

在此处输入图片说明

该值}N7+6}s&J*?C实际上是某物的密码。

我也尝试更改&为,&amp;但在这种情况下,我也收到错误消息:

Error   1   Application Configuration file "App.config" is invalid.
An error occurred while parsing EntityName. Line 54, position 51.   
D:\DBF Export\matchDBF\App.config   54  51  matchDBF
Run Code Online (Sandbox Code Playgroud)

有谁知道如何将该值存储在配置文件中吗?

小智 5

您必须用替换&字符&amp;