如何解决从.NET调用SAP PI Webservices
| 尝试使用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>
如果我在上面做错了什么,谁能纠正我?
谢谢。
解决方法
具有基本身份验证的SAP PI Web服务:
<basicHttpBinding>
<binding ...>
<security mode=\"TransportCredentialOnly\">
<transport clientCredentialType=\"Basic\" />
</security>
</binding>
</basicHttpBinding>
, 验证您的SAP Web服务凭据正确无误。我刚遇到此错误,然后问了我的SAP P.I.。管理员验证SAP服务凭据,事实证明它们已被锁定。她为我解锁了SAP凭据后,一切工作正常。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。