我正在使用靜態IP上動態代理創建的WCF服務。 Url =「http://」+ staticIP +「/CM.svc」WCF服務 - 動態代理上的400錯誤請求錯誤
BasicHttpBinding binding = new BasicHttpBinding();
也有set binding.MaxReceivedMessageSize = 2147483647; MAXBUFFERSIZE,MaxbufferPoolsize,Receivetimeout,Opentimeout,closetimeout,的SendTimeout,transferMode ...
EndpointAddress endpoint = new EndpointAddress(Url);
ChannelFactory<ICMOnlineApp> factory = new ChannelFactory<ICmOnlineApp>(binding, endpoint);
foreach(var operation in factory.Endpoint.Contract.Operations)
{
operation.Behaviors.find<DataContractSerializerOperationBehavior>().DataContractResolver = new DynamicTypeResolver();
ICMOnlineApp proxy = factory.CreateChannel();
return proxy;
}
此外,我已經做了在WCF服務的web.config文件中的所有設置。
我仍然收到此錯誤。請指導。
什麼是您的客戶實際發送到服務?你有沒有檢查過什麼電線?您可以使用wireshark,tcpmon或爲此啓用WCF跟蹤。 – Juan
我發送約21個參數給webservice。包括10個數據表,1個數據集,1個散列表和其他字符串/小數參數。我已啓用WCF跟蹤。它給了我「傳入消息(65536)的最大消息大小限額已經超出了。要增加限額,請在相應的綁定元素上使用MaxReceivedMessageSize屬性。 – Jaykishan
您是否已在客戶端和服務器中設置屬性? – Juan