Reputation: 17
I am looking to integrate Credit Safe with Sage. I tried this test code
static void Main(string[] args)
{
CreditSafe.GlobalDataServiceClient creditSafe = new CreditSafe.GlobalDataServiceClient();
CreditSafe.CountriesListingFilter f = new CreditSafe.CountriesListingFilter();
CreditSafe.CountriesList countries = creditSafe.GetCountries(f);
}
but get the error
The HTTP request is unathorised with client authentication scheme 'Anonymous'. The authentication Header received form the Server was 'Basic realm="creditsafe.com"
Upvotes: 1
Views: 241
Reputation: 11
I had the same issue. It was a setting in the config file in case you havent figured this out. Had to setup the config file like so:
<binding name="BasicHttpBinding_GlobalDataService" closeTimeout="00:10:00" openTimeout="00:10:00"
receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"
messageEncoding="Text">
<readerQuotas maxDepth="64" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport clientCredentialType="Basic" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" />
</security>
</binding>
The main part is the security mode section. Hope that helps!
Upvotes: 1