wcf - The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was 'Negotiate,NTLM' -
wcf - The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was 'Negotiate,NTLM' -
i trying connect service using next settings.
<bindings> <basichttpbinding> <binding name="enginesoap" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" sendtimeout="00:01:00" allowcookies="false" bypassproxyonlocal="false" hostnamecomparisonmode="strongwildcard" maxbuffersize="2147483647" maxbufferpoolsize="524288" maxreceivedmessagesize="2147483647" messageencoding="text" textencoding="utf-8" transfermode="buffered" usedefaultwebproxy="true"> <readerquotas maxdepth="32" maxstringcontentlength="2147483647" maxarraylength="16384" maxbytesperread="4096" maxnametablecharcount="16384"/> <security mode="transportcredentialonly"> <transport clientcredentialtype="basic" proxycredentialtype="none" realm=""/> <message clientcredentialtype="username" algorithmsuite="default"/> </security> </binding> </basichttpbinding> </bindings> <client> <endpoint address="http://addresstoservice" binding="basichttpbinding" bindingconfiguration="enginesoap" contract="trimapi.enginesoap" name="enginesoap" /> </client>
the error follows:
the http request unauthorized client authentication scheme 'basic'. authentication header received server 'negotiate,ntlm'. ---> system.net.webexception: remote server returned error: (401) unauthorized. @ system.net.httpwebrequest.getresponse() @ system.servicemodel.channels.httpchannelfactory.httprequestchannel.httpchannelrequest.waitforreply(timespan timeout) --- end of inner exception stack trace --- server stack trace: @ system.servicemodel.channels.httpchannelutilities.validateauthentication(httpwebrequest request, httpwebresponse response, webexception responseexception, httpchannelfactory factory) @ system.servicemodel.channels.httpchannelutilities.validaterequestreplyresponse(httpwebrequest request, httpwebresponse response, httpchannelfactory factory, webexception responseexception, channelbinding channelbinding) @ system.servicemodel.channels.httpchannelfactory.httprequestchannel.httpchannelrequest.waitforreply(timespan timeout) @ system.servicemodel.channels.requestchannel.request(message message, timespan timeout) @ system.servicemodel.dispatcher.requestchannelbinder.request(message message, timespan timeout) @ system.servicemodel.channels.servicechannel.call(string action, boolean oneway, proxyoperationruntime operation, object[] ins, object[] outs, timespan timeout) @ system.servicemodel.channels.servicechannel.call(string action, boolean oneway, proxyoperationruntime operation, object[] ins, object[] outs) @ system.servicemodel.channels.servicechannelproxy.invokeservice(imethodcallmessage methodcall, proxyoperationruntime operation) @ system.servicemodel.channels.servicechannelproxy.invoke(imessage message)
i tried alter clientcredentialtype="basic" both "windows" , "ntlm" in vain. can't set security mode other "transportcredentialonly" service doesn't utilize ssl.
also, username 'domain\username'.
what missing?
basic authentication service application on server (iis) wasn't enabled. enabling fixed issue me.
wcf authentication iis wcf-security hp-trim
Comments
Post a Comment