Wcf WebService & WcfDataservice not worked in web application. RRS feed

  • Question

  • Hi,

    I have some problem on using wcf web service & wcf dataservice.I published my both wcfDataservice & Wcf Webservice & consume in website. On locally it works fine but when i published website with consuming this services then login not be done or there is error an error.

    The  error is 

         There was no endpoint listening at http://MyServer/DemoProject/wcfweb.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

    Server stack trace: 
       at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
       at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, 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 ITranzaptServiceWEB.ValidateUser(String EmailID, String Password)
       at TranzaptServiceWEBClient.ValidateUser(String EmailID, String Password)

    Inner Exception:
    Unable to connect to the remote server
       at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
       at System.Net.HttpWebRequest.GetRequestStream()
       at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()

    Inner Exception:
    A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Myserver:80
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)

    Please help me.........

    Monday, August 12, 2013 12:45 PM


  • Hi,

    If you deployed the .svc file in IIS, you had better not to use the absolute path in endpoint, you could use relative path or mex to address.

    When occur this problem, it should be the following reasons:

    1. ensure your WCF service host is running before your client call it.
    2. check your client WSDL file, it contains the WCF service methods and action values which used to transfer the messages.
    3.Check your client config file and make sure your client endpoint address is right. 

    If your problem still can not be solved, please post your configure file here to help find a solution.

    Best Regards.

    Amy Peng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 13, 2013 5:15 AM