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?
Use " & " instead of "&".
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 &
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With