2013-02-12 76 views
-1

Error details: System.ServiceModel.ProtocolException: The remote server returned an unexpected response: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result) --- End of inner exception stack trace ---Biztalk发送端口呼叫.asmx服务

Server stack trace: at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result) at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result) MessageId: {656781BB-FFA0-466B-A001-83ADCD4EEB78}

使用BasicHTTPbindings ...没有登录凭证。在使用其他WCF测试工具进行测试时工作。

+0

'.asmx'用于'ASP.Net'网络服务,'.svc'用于'WCF'网络服务。两者不同。我不惊讶您无法使用WCF客户端调用.asmx Web方法。你确定这应该工作吗? – DeanOC 2013-02-12 22:12:45

+0

您可以从WCF客户端调用.asmx serivces。它应该使用BasicHTTP绑定。我今天这样做,没有问题。我在这里想念的是远程错误在这里。我怀疑这是一个糟糕的SOAP请求。如果您调试远程a​​smx服务并在您的Web方法的第一行中放置一个断点,是否将该电话置于断点?如果没有,那么调用格式不正确,IIS正在捕获它并返回错误的请求,因为您的调用的签名与Web方法的签名不匹配。该方法中的错误应返回50倍。 – TimWagaman 2013-02-13 13:13:05

+0

使用** HTTP Fiddler **,看看当您使用WCF测试工具调用Web服务时会发生什么,在Biztalk调用时它的工作原理和比较方式相同。它应该给你一个线索。 – user1826905 2013-02-14 09:36:08

回答

0

您应该设置此Web服务器以将错误文本返回给调用者。默认情况下(出于安全原因)它不会返回它。您也可以将调试器附加到Web服务并根据请求本地化问题。