In my AppSettings in web.config
, I have something like this:
<appSettings>
<add key="ExternalSystemUrl" value="http://example.com/page.aspx?id={0}&action=eat&object=bacon" />
</appSettings>
However, it seems that when an ampersand (&
) is included in an AppSettings value, ASP.NET throws the following error:
An error occurred while parsing EntityName
Why does this happen, and how can I include URLs like this in App.config
?