My password contains special characters like '&' and VS giving error on this like Password=abcdef!@hh&held
How can I use special characters in my web.config file?
My password contains special characters like '&' and VS giving error on this like Password=abcdef!@hh&held
How can I use special characters in my web.config file?
Since the web.config file is an XML file, the values need to be XML encoded:
Password=abcdef!@hh&held
Note how &
is replaced by &
The web.config is like any other XML file, so certain characters need to be encoded.
For example, &
should be written as &
.
You might want to enforce encryption for the connection string and application setting in the web.config file.
Please refer to the article here : http://davidhayden.com/blog/dave/archive/2005/11/17/2572.aspx
and here :