从.NET调用SAP PI Web服务

Nil*_*Pun 4 wcf

尝试使用C#.net控制台调用SAP PI Web服务时,我收到以下错误消息应用程序:

The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was 'Basic realm="XISOAPApps"'.m="XISOAPApps"'.
Run Code Online (Sandbox Code Playgroud)

我的自定义绑定看起来像这样:

<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>  
Run Code Online (Sandbox Code Playgroud)

如果我上面做错了,有人可以纠正我吗?谢谢.

Bri*_*Low 8

具有基本身份验证的SAP PI Web服务:

      <basicHttpBinding>
        <binding ...>
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Basic" />
          </security>
        </binding>
      </basicHttpBinding>
Run Code Online (Sandbox Code Playgroud)