What is the escape sequence for &-sign in string literals in web.config?
Asked
Active
Viewed 2.7k times
20
-
possible duplicate of [Where can I get a list of the XML document escape characters?](http://stackoverflow.com/questions/1091945/where-can-i-get-a-list-of-the-xml-document-escape-characters) – shahkalpesh Feb 02 '11 at 11:19
-
This answers does adress your issue: [escape-quote-in-web-config-connection-](http://stackoverflow.com/questions/3177861/escape-quote-in-web-config-connection-string#answer-10142361) – surfmuggle Mar 06 '14 at 11:57
3 Answers
0
I'm afraid the &
doesn't work in web.config, it must have stricter rules than normal XML:
<add key="ST_CF_AppType_ipad" value="http://itunes.apple.com/se/app/itunes-u/id490217893?l=en&mt=8" />
Gives an error occurred while parsing EntityName
.

Joachim Sauer
- 302,674
- 57
- 556
- 614

SHO
- 19
-
1-1 because this is not correct. `
` works fine in a Web.Config file. (Tested with the above appSetting in .NET 4.0 MVC app - but it should be the same in other framework versions.) – Jude Fisher Oct 02 '12 at 16:57