Windows身份验证的用户ID和密码 [英] User Id and Password for Windows authentication

查看:790
本文介绍了Windows身份验证的用户ID和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仅在我的SQL Server 2005中配置Windows身份验证.
现在,我试图从我的ASP.Net网站连接一个名为Employee的数据库.
我使用了以下连接字符串
SqlConnection con =新的SqlConnection("server = AVIANI; database = Employee; IntegrategratedSecurity = SSPI");
我收到以下错误:
不支持的关键字:集成安全性".
那么什么是合适的SQLConnection?
如果我需要使用UserId和密码,怎么找到呢?

Windows Authentication is configured only in my SQL Server 2005.
Now I am trying to connect a database named Employee from my ASP.Net web site.
I have used the following connectionstring
SqlConnection con = new SqlConnection("server=AVIANI;database=Employee;IntegrategratedSecurity=SSPI");
I am getting the following error:
Keyword not supported: ''integrategrated security''.
Then What will be the proper SQLConnection?
If I need to use UserId and password,how to find that?

推荐答案

在此链接中检查连接字符串格式
http://msdn.microsoft.com/en-us/library/ms998292.aspx [ ^ ]

Check the connection string format in this link
http://msdn.microsoft.com/en-us/library/ms998292.aspx[^]

<connectionStrings>
  <add name="MyDbConn1" 
       connectionString="Server=MyServer;Database=MyDb;Trusted_Connection=Yes;"/>
  <add name="MyDbConn2" 
      connectionString="Initial Catalog=MyDb;Data Source=MyServer;Integrated Security=SSPI;"/>
</connectionStrings> 


您好,您错误地将"IntegrategratedSecurity"一词拼写为"IntegratedSecurity"
Hi, you wrongly spelled that word ''IntegrategratedSecurity'' that must be as ''IntegratedSecurity''


这篇关于Windows身份验证的用户ID和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆