Accessing a SPNEGO authenticated webservice from C#

自古美人都是妖i 提交于 2019-12-07 12:00:59

问题


We have a web service that serves data over HTTP and authenticates users via SPNEGO (and single sign-on). We want to write a C# client for this web service.

Is there any standard/provided way in .NET of generating the necessary token? Extensive Googling suggests that there is no native support for SPNEGO.


回答1:


In Windows the following should do the trick:

BasicHttpBinding binding = new BasicHttpBinding();
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
//SSL (https):
binding.Security.Mode = BasicHttpSecurityMode.Transport;


来源:https://stackoverflow.com/questions/5408152/accessing-a-spnego-authenticated-webservice-from-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!