Persist Security Info 参数的作用
2009-03-21 09:26
405 查看
Persist Security Info属性的意思是表示是否保存安全信息,其实可以简单的理解为"ADO在数据库连接成功后是否保存密码信息",True表示保存,False表示不保存.ADO缺省为True(ADO.net缺省为False,未测试,根据参考资料上说的)
具体可以通过ADO的Connect对象的ConnectString属性进行验证,如下所示"
----------------------------------------------------------------------------------------
数据库连接前
ConnectString="Data Source=60.190.130.140;Initial Catalog=DB;User ID=sa;Password=123456;Persist Security Info=false;Provider=System.Data.SqlClient;"
数据库连接成功后
ConnectString="Data Source=60.190.130.140;Initial Catalog=DB;User ID=sa;Provider=System.Data.SqlClient;"
-----------------------------------------------------------------------------------------
数据库连接前
ConnectString="Data Source=60.190.130.140;Initial Catalog=DB;User ID=sa;Password=123456;Persist Security Info=True;Provider=System.Data.SqlClient;"
数据库连接成功后
ConnectString="Data Source=60.190.130.140;Initial Catalog=DB;User ID=sa;Password=123456;Provider=System.Data.SqlClient;"
-----------------------------------------------------------------------------------------
总体来说,如果数据库连接成功后不再需要连接的密码,出于安全性考虑,还是建议将Persist Security Info设为false,以防止后门程序取得数据库连接的密码(windows2003在sp1前就发生过这个问题)。
以下是摘自微软的ADO.net资料
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconsecureadonetconnections.asp
具体可以通过ADO的Connect对象的ConnectString属性进行验证,如下所示"
----------------------------------------------------------------------------------------
数据库连接前
ConnectString="Data Source=60.190.130.140;Initial Catalog=DB;User ID=sa;Password=123456;Persist Security Info=false;Provider=System.Data.SqlClient;"
数据库连接成功后
ConnectString="Data Source=60.190.130.140;Initial Catalog=DB;User ID=sa;Provider=System.Data.SqlClient;"
-----------------------------------------------------------------------------------------
数据库连接前
ConnectString="Data Source=60.190.130.140;Initial Catalog=DB;User ID=sa;Password=123456;Persist Security Info=True;Provider=System.Data.SqlClient;"
数据库连接成功后
ConnectString="Data Source=60.190.130.140;Initial Catalog=DB;User ID=sa;Password=123456;Provider=System.Data.SqlClient;"
-----------------------------------------------------------------------------------------
总体来说,如果数据库连接成功后不再需要连接的密码,出于安全性考虑,还是建议将Persist Security Info设为false,以防止后门程序取得数据库连接的密码(windows2003在sp1前就发生过这个问题)。
以下是摘自微软的ADO.net资料
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconsecureadonetconnections.asp
相关文章推荐
- Persist Security Info 参数的作用
- ADO数据库连接中的Integrated Security和Persist Security Info参数的作用
- ADO数据库连接中的Persist Security Info参数的作用
- Persist Security Info 参数的作用
- Persist Security Info 参数的作用
- 终于搞清楚了ADO数据库连接中的Persist Security Info参数的作用
- Persist Security Info参数的作用
- Persist Security Info 参数的作用
- ADO数据库连接中的Persist Security Info参数的作用
- 终于搞清楚了ADO数据库连接中的Persist Security Info参数的作用
- 数据库连接的Persist Security Info参数说明
- Keep Persist Security Info as False
- Persist Security Info的意义
- .NET连接数据库字符串密码丢失的解决方法(persist security info=true;)
- Persist_Security_Info AND Integrated_Security
- Persist Security Info=False"表示的是什么?
- Persist Security Info意义(转)
- NET连接数据库字符串密码丢失的解决方法(persist security info=true;)
- Persist Security Info
- Persist Security Info=False是干什么的