简体   繁体   English

具有http接口的c#应用程序需要实现NTLM身份验证

[英]c# application with http interface needs to implement NTLM authentication

I have an existing c# service running on a Windows client or server. 我在Windows客户端或服务器上运行了现有的c#服务。 To handle these I have added a simple http based management code, in order to install, remove, start and stop child processes (as services) remotely. 为了解决这些问题,我添加了一个基于http的简单管理代码,以便远程安装,删除,启动和停止子进程(作为服务)。

It works, however this management access needs some sort of authentication, else anyone knowing the system can screw it up pretty badly. 它可以工作,但是这种管理访问需要某种身份验证,否则任何知道该系统的人都可能将其严重破坏。 As it is C#, I was thinking of using NTLM, hoping it was a built in set of libraries in the C#/.NET framework. 因为是C#,所以我想使用NTLM,希望它是C#/。NET框架中的内置库集。

I can find plenty of examples on how to connect to an NTLM authenticated page/site, but not how to implement this myself on the server side. 我可以找到很多有关如何连接到NTLM身份验证的页面/站点的示例,但是找不到如何在服务器端自己实现的示例。

Personally I would use WCF with a net.tcp binding to expose a management API from a Windows Service to Windows clients. 我个人将WCF与net.tcp绑定一起使用,以将管理API从Windows服务公开给Windows客户端。 net.tcp uses Windows authentication and encrypts the message out of the box. net.tcp使用Windows身份验证并对消息进行开箱即用的加密。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM