https://stackoverflow.com/questions/14607920/the-character-breaks-passwords-that-are-stored-in-the-web-config

答案一

I suspect that you didn't encode the password properly in the web.config file. Remember that web.config is a XML file, so entities must be encoded.

Instead of

my&password 

try

my&password

You can use sites such as FreeFormatter.com to escape/unescape XML strings.

 

答案二

< = &lt;
> = &gt;
" = &quot;
' = &apos;
& = &amp;

 

方案三

Escapes or unescapes an XML file removing traces of offending characters that could be wrongfully interpreted as markup.

The following characters are reserved in XML and must be replaced with their corresponding XML entities:

  • ' is replaced with &apos;
  • " is replaced with &quot;
  • & is replaced with &amp;
  • < is replaced with &lt;
  • > is replaced with &gt;

 

 

 

 

相关文章:

  • 2021-10-16
  • 2022-12-23
  • 2021-07-04
  • 2022-01-25
  • 2022-12-23
  • 2021-06-13
  • 2022-01-01
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2021-11-10
  • 2021-12-16
相关资源
相似解决方案