1
因此,我想从wcf服务http://www.domain/Service.svc获取数据。要访问,您需要一个标题授权:username_value:password_value,纯文本。但是,当我尝试从Service.svc获取数据时,我收到400个错误的请求。我的猜测是必须相应设置的安全部分。我的设置是现在:用于svc服务的web config中的安全设置
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" closeTimeout="00:01:00">
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" />
<message clientCredentialType="UserName" />
</security>
这样可以吗?谢谢。
欢迎计算器!您需要发布客户端和服务器端WCF配置。有人很可能会帮助你。 –
只要参考这篇文章http://stackoverflow.com/questions/2456301/wcf-the-remote-server-returned-an-error-400-bad-request可能是这将解决您的查询。 – kiran