0
我是这类项目中最新的,我需要一些帮助。我有一个ASPX应用程序,它必须通过SOAP完成SAP服务。第三个合作伙伴为我提供wsdl文件以附加de服务。 OK,当我基于WSDL添加服务引用,在我的web.config接下来的文件被添加:如何使用ASPX的SAP Service Reference
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="ZWSDISLINEPEDIDOS" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://SomeURL" binding="basicHttpBinding" bindingConfiguration="ZWSDISLINEPEDIDOS"
contract="WS_SAP_PEDIDOS.ZWSDISLINEPEDIDOS" name="ZWSDISLINEPEDIDOS" />
</client>
</system.serviceModel>
而且我的.cs有下面的代码:
BasicHttpBinding _Binding = new BasicHttpBinding();
EndpointAddress address = new EndpointAddress("http://SomeURL");
ZWSDISLINEPEDIDOSClient _Client = new ZWSDISLINEPEDIDOSClient(_Binding, address);
_Client.ClientCredentials.UserName.UserName = "MyUserName";
_Client.ClientCredentials.UserName.Password = "MyPassword";
When we try to call a method from the client the next error fires:
“一solicitud HTTP没有ESTA autorizada CON EL esquema德autenticación德cliente '匿名'。厄尔尼诺encabezado德autenticaciónrecibido德尔servidor时代 '基本境界= “的SAP NetWeaver应用服务器[LP1/100]”'
任何想法?
您应该翻译中文错误消息 –
对不起:HTTP请求未经客户端身份验证方案'匿名'未经授权。从服务器收到的验证标头为'Basic realm =“SAP NetWeaver Application Server [LP1/100] –