error loading Web.config

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm getting an error when I use the < symbol in a string in the <appSettings> section
This example works fine
<add key="From" value="(e-mail address removed)"></add

This example causes an error
<add key="From" value="John Doe <[email protected]>"></add

It seems to be seeing the extra <> within the string as tags. How can I force it to see them as literal?
 
This is one of the basic things with XML. You need to put < and >'s as &lt;
, &gt; encoded if you want to store them in XML (as XML uses tag characters
as separators normally).

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


I'm getting an error when I use the < symbol in a string in the
<appSettings> section.
This example works fine:
<add key="From" value="(e-mail address removed)"></add>

This example causes an error:
<add key="From" value="John Doe <[email protected]>"></add>

It seems to be seeing the extra <> within the string as tags. How can I
force it to see them as literal?
 
Back
Top