在我的web.config中的AppSettings解析AppSettings的价值,我有这样的事情:错误与查询字符串
<appSettings>
<add key="ExternalSystemUrl" value="http://domain.com/page.aspx?id={0}&action=eat&object=bacon" />
</appSettings>
但是,看来,当一个符号(&
)被包括在AppSettings的价值, ASP.NET会抛出以下错误:
An error occurred while parsing EntityName
为什么会发生这种情况,以及如何在App.config中包含这样的URL?