Wednesday, 15 August 2012

vb.net - The HTTP request is unauthorized with client authentication scheme 'Negogiate'. The authentication header ... was 'Negotiate,Kerberos,NTLM' -


We are trying to get data from an external web service using VB.Net.

We have our code to get to prove Dbluesdiel added a service reference, right

data:

  dim MyClient New ExtConn.GetConnectorSoapClient as () MyClient.ClientCredentials.UserName.UserName = "AOL \ 12345.abcde" MyClient. Client Credentials User name Password = "Pass 123" as Dim Myrake New ExCon. GateDetivore dim MERSsons such as New Exacton Microd demand as gateadata response new system. Service model. Description. Client credentials () Dim MyReqBody as new extension. GETDataRequestBody ("Environment123", "AOL \ 12345.abcde", "pass123", "12345.abcde", "GetData", "") MyReq.Body = MyReqBody MyResponse = MyClient.ExtConn_GetConnectorSoap_GetData (MyReq) MSBbox (MyResponse.Body. GetDataResult)  

Our app.config is:

  & lt; XML version = "1.0" encoding = "utf-8" & gt; & Lt; Configuration & gt; & Lt; Startup & gt; & Lt; Supported serial version = "v4.0" sku = ".NETFramework, version = v4.5" /> & Lt; / Startup & gt; & Lt; System.serviceModel & gt; & Lt; Binding & gt; & Lt; BasicHttpsBinding & gt; & Lt; Compulsory name = "GetConnectorSoap" & gt; & Lt; Safety Mode = "Transportation" & gt; & Lt; Transport customer credential type = "NTLM" realm = "" /> & Lt; Message client CredentialType = "UserName" /> & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / BasicHttpsBinding & gt; & Lt; / Binding & gt; & Lt; Customers & gt; & Lt; endpoint address = "https://ota.externalservice.nl/ourservices/getconnector.asmx" binding = "basicHttpsBinding" bindingConfiguration = "GetConnectorSoap" contract = "ExtConn.GetConnectorSoap" name = "GetConnectorSoap" / & gt; & Lt; / Customer & gt; & Lt; /system.serviceModel> & Lt; / Configuration & gt;  

Answer:

HTTP request client authentication schemes from unauthorized authentication server with the "NTLM" header "Negotiate, Kerberos, NTLM was' < / P>

My questions are:. Are we doing wrong? If NTLM is accepted as the authentication mode, then why do we get this error?

"itemprop =" text ">

You can try to add it as a web reference (Add Service Reference> Advanced. .> Add Web Reference)

  GetConnector Connector = New GetConnector (); Connector Credential = new network credentials ("username", "password", "domain"); String reaction = connector. GateData ();  

No comments:

Post a Comment