Search code examples
web-config

Getting "Entity 'response_type' not defined" in ASP.NET web.config


Visual Studio is complaining about the following line in my web.config file:

<add key="foo" value="http://localhost?client_id=abc123&response_type=code&redirect_uri=google.com"/>

with the following errors:

"Entity 'response_type' not defined"
"Entity 'redirect_uri' not defined"

It says it expects a semi-colon where the equal signs are.

How can I escape this string so that it is treated as plain text? I tried using an @ sign.


Solution

  • The & in the string is causing the error.

    To my horror the & is within my SMTP settings for my email password in System.Net. I came here in the hope to learn how to define the string or the &.