The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'BASIC realm="Service-now"'.

sunitajodha
Kilo Explorer

I have tried to access SOAP service using c# code. I have selected basic authentication type but still it is taking Anonymous   and giving the following error:

"The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'BASIC realm="Service-now"'."

5 REPLIES 5

I 've got the same error, it seems a proxy issue , by replacing 

<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None"

with 

<security mode="Transport">
<transport clientCredentialType="Basic" proxyCredentialType="Basic"

 

Entries of web.config to update :

<binding name="EnpointName" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"
messageEncoding="Text">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">
<transport clientCredentialType="Basic" proxyCredentialType="Basic"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>