gpt4 book ai didi

.net - app.config 中的 ConnectionStrings 带有 .config 文件不喜欢的字符

转载 作者:行者123 更新时间:2023-12-03 23:11:32 25 4
gpt4 key购买 nike

我一直在寻找答案,但找不到。它必须是显而易见的,而我只是想念它。

我们在 app.config 文件中有一个连接字符串问题。它使用 SQL Server 身份验证,密码包含“&”和“+”符号。显然解析出错了。此时更改密码会很麻烦。有没有办法处理这个问题?

partial connection string with sensitive data blocked

最佳答案

将 '&' 编码为 '&' - &符号是 XML 中的保留字符

更多信息:http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

关于.net - app.config 中的 ConnectionStrings 带有 .config 文件不喜欢的字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10142193/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com