Browser connects to WCF service but not my WCF client. What can be the reason? -
On the production server (Windows Server 2003 SP2), I can connect to a remote WCF service with Internet Explorer 8: When I browse the URL (where my service listens) I see the expected notification page of the service I Internet Connection setting in Explorer specifies only "auto address", proxy settings are disabled.
If I connect to the same server on the same console console application (which is created with WCF) the same WCF service is telling me that no endpoint is available but not available.
WCF Client Configuration:
& lt; Configuration & gt; & Lt; System.serviceModel & gt; & Lt; Binding & gt; & Lt; WsHttpBinding & gt; & Lt; Binding name = "WSHttpBinding_IMyService" closeTimeout = "00:01:00" openTimeout = "00:01:00" receiveTimeout = "00:10:00" sendTimeout = "00:01:00" bypassProxyOnLocal = "false" transactionFlow = " False "hostNameComparisonMode =" StrongWildcard "maxBufferPoolSize =" 524288 "maxReceivedMessageSize =" 65536 "messageEncoding =" text "textEncoding =" utf-8 "useDefaultWebProxy =" true "AllowCookies =" false "& gt; & Lt; ReaderQuotas maxDepth = "32" maxStringContentLength = "8192" maxArrayLength = "16384" maxBytesPerRead = "4096" maxNameTableCharCount = "16384" /> & Lt; Trusted session ordered = "true" idle time = "00:10:00" enabled = "wrong" /> & Lt; Safety Mode = "None" & gt; & Lt; Transport Client Credential Type = "Windows" Proxy Credential Type = "None" realm = "" /> & Lt; Message Client Credential Type = "Windows" Conversation ServiceCreation = "true" /> & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / WsHttpBinding & gt; & Lt; / Binding & gt; & Lt; Customers & gt; & Lt; Endpoint address = "http://www.domain.com/Service.svc" binding = "wsHttpBinding" bindingConfiguration = "WSHttpBinding_IMyService" contract = "Service.IMyService" name = "WSHttpBinding_IMyService" /> & Lt; / Customer & gt; & Lt; /system.serviceModel> & Lt; Configuration & gt;
With these settings, I can communicate successfully with remote service from my development machine.
Searching for other options I found out that I have Internet Explorer proxy settings:
& Lt; / DefaultProxy & gt; & Lt; /system.net>
It was not working and I'm not sure that I really understand this setting correctly. (I hope WCF customers connect to the "auto-find" installation of Internet Explorer and then to serve like IE installed in the same way.)
I also use Now I am asking for help, what can I do? Which setting might be incorrect or unavailable? Edit: In the heap useDefaultWebProxy < There was no success in binding configuration between / code> correct and false.
(The documentation says: It will pick up Internet Explorer settings but it does not work.) Finally the customer gave me a solid proxy address and I have compelled my client configuration in the following manner: InnerException
is saying:
- changed:
useDefaultWebProxy = "false"
(instead oftrue
) - Added:
proxyAddress = "http : //10.20. 30.40: 8080 "
(Edit 2: IP address not only! Prefix withhttp: //
is important! Otherwise See the follow-up question below.)
With this WebException and SocketConnection disappeared and the client service seems to be connected, but I now have the first problem when the first Calling service operation I will put it in a new question.
Edit: Here is the follow-up question:
Edit 2: Answer- above question with proxy address
with The http
is important for the prefix. (My answer has changed now)