尝试使用C#.net控制台调用SAP PI Web Services时,我收到以下错误消息。应用程序:
The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was 'Basic realm="XISOAPApps"'.m="XISOAPApps"'.
我的自定义绑定看起来像这样:
<customBinding>
<binding name="CustomHttpTransportBinding">
<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
messageVersion="Soap11" writeEncoding="utf-8">
<readerQuotas maxDepth="10000000" maxStringContentLength="10000000"
maxArrayLength="67108864" maxBytesPerRead="65536" maxNameTableCharCount="100000" />
</textMessageEncoding>
<httpTransport authenticationScheme="Basic" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard" keepAliveEnabled="false"
proxyAuthenticationScheme="Basic" realm="XISOAPApps" useDefaultWebProxy="true" />
</binding>
</customBinding>
如果我上面做错了,有人可以纠正我吗? 谢谢。
答案 0 :(得分:7)
SAP PI Webservice with Basic Authentication:
<basicHttpBinding>
<binding ...>
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" />
</security>
</binding>
</basicHttpBinding>
答案 1 :(得分:0)
验证您的SAP Web服务凭据是否正确,但未锁定。我刚刚遇到这个错误,我问了我的SAP P.I.管理员验证SAP服务凭据,结果证明它们已被锁定。一旦她为我解锁了SAP凭证,一切都运行良好。