更新时间:2021-09-28 22:01:14
您的连接字符串告诉它使用集成安全性SSPI,它将使用Windows凭据。
Your connection string is telling it to use integrated security SSPI, which will use the Windows credentials.
将集成安全性
设置为 false
如果您要提供用户名和密码。
Set Integrated Security
to false
if you are going to be providing the username and password.
另外,请考虑将您的连接字符串放在web.config文件中 - 它更安全,可重复使用。
Also, consider putting your connection string inside of the web.config file - it is more secure and reusable.
如果为false,则在连接中指定用户ID和密码。如果为true,则使用当前Windows帐户凭据进行身份验证。
识别值为true,false,yes,no和sspi(强烈推荐),相当于true。
如果指定了用户ID和密码且Integrated Security设置为true,则将忽略用户ID和密码,并将使用Integrated Security。