NTLM sql连接字符串 [英] NTLM sql connection string

查看:71
本文介绍了NTLM sql连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将网站的数据库连接从连接字符串中的用户名和密码切换到NTLM-从我得到的信息来看,这应该只是更新连接字符串的问题.

I need to switch a website's database connection from username and password in the connection string to NTLM - from what I have been told, this should just be a matter of updating the connection string.

我花了一些时间浏览这里和整个网络;我发现了很多非常令人困惑的页面,这些页面解释了NTLM的工作方式(我以前从未使用过任何身份验证),但是还没有找到如何在web.config中设置连接字符串的简单示例,以使用NTLM.

I have spent some time trawling through here and the web in general; I have found a lot of very confusing pages that explain how NTLM works (I have never had to work with any kind of authentication before), but have not found a simple example of how to set up the connection string in my web.config to use NTLM.

任何人都可以提供一个示例,说明如何配置NTLM配置的连接字符串(我有服务帐户名和密码)-或者,如果我被误导了,有人可以向我指出逐步的方向如何将这种连接整合到我的网站中的指南?

Can anyone provide an example of how an NTLM-configured connection string should look (I have the service account names and passwords) - alternatively if I have been misinformed, can someone point me in the direction of a step-by-step guide as to how to integrate this connection into my website?

推荐答案

您可能正在寻找有关此问题的体面信息,因为通常不再将其称为NTLM.

You may be struggling to find decent information about this because it's not normally referred to as NTLM any more.

用SQL Server的话来说,您要寻找的是集成安全性".您可以在

In SQL Server parlance, what you're looking for is "Integrated Security". You can specify this in your connection string as:

Server=SomeServer;Database=SomeDatabase;Integrated Security=SSPI;

这应该足够了-连接安全将基于执行代码的Windows用户帐户,而不是显式提供用户名/密码组合.

And that should be sufficient - the connection security will be based on the windows user account under which the code is executing, rather than explicitly providing a username/password combination.

SSPI表示安全性支持提供商接口,用于表示可以协商安全协议的 range ,例如NTLM和Kerberos.

SSPI stands for Security Support Provider Interface and is used to indicate that a range of security protocols, such as NTLM and Kerberos can be negotiated.

这篇关于NTLM sql连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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