0
votes

I have a wcf service which is hosted in windows service and when run at 8083 port, the service method invocation from client throws below error. However if the service is started at another port number , then there is no error when the operation contract is invoked from the client . how can i resolve the error with port 8083

The HTTP service located at http://localhost:8083/WinService is unavailable. This could be because the service is too busy or because no endpoint was found listening at the specified address. Please ensure that the address is correct and try accessing the service again later.

Server stack trace: at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason) at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

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 IInterOpIntegrationWCFService.TestService(ClientIdentity objClientIdentity) at InterOpIntegrationWCFServiceClient.TestService(ClientIdentity objClientIdentity)

Inner Exception: The remote server returned an error: (503) Server Unavailable. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

1

1 Answers

0
votes

For this situation, a service endpoint WCF must always supply the ABC - Address, Binding, Contract. You only define the binding and contract in your config. I notice that there is nothing within the endpoint address property.

And you can refer to the following links for more information:

Why WCF cannot be invoked in wcftestclient?

https://social.msdn.microsoft.com/Forums/vstudio/en-US/4d900638-dbbd-4d88-a835-bc8565e83cbf/failed-to-invoke-the-service-possible-causes-the-service-is-offline-or-inaccessible-while-invoking?forum=wcf

Answered by http://forums.asp.net/t/2016601.aspx?wcf+test+client+failed+to+invoke+the+service