Csharp/C#教程:持久安全信息Property = true且Persist Security Info Property = false分享


持久安全信息Property = true且Persist Security Info Property = false

对于属性:

Persist Security Info=true 

 Persist Security Info=false 

你能告诉我他们之间有什么区别吗?如果我不把它放在我的连接中会发生什么?

 connect.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:/Users/Nourah/Downloads /Phase3/Salary.accdb; Persist Security Info=False;"; 

即使您设置Persist Security Info= truePersist Security Info=false它也不会在前面显示差异。差异发生在后台

Persist Security Info set to false ,如果连接处于打开状态或处于打开状态,则不会将连接中返回的安全敏感信息(如密码)作为连接的一部分返回。

如果将Persist Security Info to True设置Persist Security Info to True ,Windows将记住连接字​​符串中指定的密码。

多数民众赞成。

MSDN解释

设置Persist Security Info只有在连接字符串中提及用户名和密码才会生效。 如果您在connectionstring中提及用户名和密码并将Persist Security Info设置为false则无法提取凭据。 但是如果你将Persist Security Info设置为true而在连接字符串窗口中提供凭据将记住凭据,它可以在pgm中提取

上述就是C#学习教程:持久安全信息Property = true且Persist Security Info Property = false分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/cdevelopment/989510.html

(0)
上一篇 2021年12月23日
下一篇 2021年12月23日

精彩推荐