Nasz zespół stara się stworzyć aplikację Windows (C#) do wywołania usługi WCF za pomocą serwera www proxyKlient Windows WCF z internetowym serwerem proxy pokazującym błąd Serwer popełnił naruszenie protokołu. Sekcja = ResponseStatusLine
Pokazuje wyjątek „Serwer popełnione naruszenie protokołu. Sekcja = ResponseStatusLine” podczas wywoływania usługa WCF
proszę dać sugestię, aby rozwiązać ten problem/jakimkolwiek innym alternatywnym rozwiązaniem
//Code for creating proxy
public static DevicesServiceClient CreateProxy()
{
var proxy = new DevicesServiceClient("BasicHttpBinding_IDevicesService");
BasicHttpBinding binding = new BasicHttpBinding();
binding.Security.Mode = BasicHttpSecurityMode.None;
binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
binding.UseDefaultWebProxy = false;
binding.ProxyAddress = new Uri(string.Format("http://{0}:{1}", "192.168.0.20","808"));
proxy.Endpoint.Binding = binding;
proxy.ClientCredentials.UserName.UserName = "Username";
proxy.ClientCredentials.UserName.Password = "Password";
}
Server ślad stosu:
w System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException (WebException WebException, HttpWebRequest prośba HttpAbortReason abortReason)
w ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply (TimeSpan timeout)
w System.ServiceModel.Channels.RequestChannel .Request (wiadomosc, limit czasu TimeSpan)
na System.ServiceModel.Dispatcher.RequestChannelBinder.Request (wiadomosc, limit czasu TimeSpan)
na System.ServiceModel.Channels.ServiceChannel.Call (akcja String, Boolean jednokierunkowy, operacja ProxyOperationRuntime , Object [] ins, Object [] out, Timeout timeout)
w System.ServiceModel.Channels.ServiceChannel.Call (działanie String logicznego jednokierunkowy, operacji ProxyOperationRuntime, obiekt [] iny, obiekt [] out)
w System.ServiceModel.Channels.ServiceChannelProxy.InvokeService (IMethodCallMessage methodCall, ProxyOperationRuntime działanie)
w System.ServiceModel.Channels.ServiceChannelProxy.Invoke (komunikat iMessage)Wyjątek rethrown w [0]
w System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage (iMessage reqMsg, iMessage retMsg)
w System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (MessageData & msgData, typ Int32)
na DevicesService.IDevicesService.CheckNetworkConnection (String ipAddress)
Mój klient kod boczny w app.config
Serwer kodu po stronie w pliku web.config
Podaj kod/odniesienie do rozwiązywania tego problemu, które już wspomniano w swojej odpowiedzi „pełnomocnika użycie domyślnej internetowej i ustawić tam adres URL lub utwórz całe nowe niestandardowe powiązanie i ustaw adres URL serwera proxy w elemencie wiążącym transport HTTP. " – amexn