locked
The remote server returned an error: (404) Not Found. RRS feed

  • Question

  • Hi I am having an WCF sync Service hosting on IIS7 on my server, I can access the URL in browser, Actually i built the WCF service and later on i added a wcf service website to my solution by adding my wcf service reference. and in the service.svc file i mentioned the particular service.

    BUT When i am trying to access the service it is giving me the "The remote server returned an error: (404) Not found" but still i can access the service through URL


    Stack Trace:

    [WebException: The remote server returned an error: (404) Not Found.] System.Net.HttpWebRequest.GetResponse() +6440920 System.ServiceModel.Channels.HttpChannelRequest.WaitForReply(TimeSpan timeout) +55 [EndpointNotFoundException: There was no endpoint listening at http://localhost:1695/Service1.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.] System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10582079 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +336 DSClient.ServiceReference1.IDSService.GetTree(String handleObj) +0 DSClient.Controllers.HomeController.Index() +39....

    Please can some one help me??

    Thursday, April 4, 2013 3:58 PM

Answers

  • Debug the WCF function which you are calling when you receive this error. Probably some exception in that function.

    Gaurav Khanna | Microsoft VB.NET MVP | Microsoft Community Contributor

    • Marked as answer by Haixia_Xie Monday, April 22, 2013 8:37 AM
    Thursday, April 4, 2013 7:11 PM
  • Hi,

    >>Actually i built the WCF service and later on i added a wcf service website to my solution by adding my wcf service reference.

    Hope the issue is resolve now. What do you mean with "a wcf service website "?

    Please try consume the service from a Windows application( e.g Console app) by using "Add Service Reference".

    #Add Service Reference Dialog Box

    http://msdn.microsoft.com/en-us/library/bb386382.aspx?ppud=4

    Best Regards.


    Haixia
    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.

    • Marked as answer by Haixia_Xie Monday, April 22, 2013 8:37 AM
    Monday, April 15, 2013 1:38 AM

All replies

  • Debug the WCF function which you are calling when you receive this error. Probably some exception in that function.

    Gaurav Khanna | Microsoft VB.NET MVP | Microsoft Community Contributor

    • Marked as answer by Haixia_Xie Monday, April 22, 2013 8:37 AM
    Thursday, April 4, 2013 7:11 PM
  • When run my service on the browser it works well, but the exeption is when i called my service on the client project.
    Saturday, April 6, 2013 10:48 AM
  • Do not use port number in your URL

    http://localhost:1695/Service1.svc

    it should be http://localhost/Service1.svc


    ViBi

    Monday, April 8, 2013 9:02 AM
  • Hi,

    >>Actually i built the WCF service and later on i added a wcf service website to my solution by adding my wcf service reference.

    Hope the issue is resolve now. What do you mean with "a wcf service website "?

    Please try consume the service from a Windows application( e.g Console app) by using "Add Service Reference".

    #Add Service Reference Dialog Box

    http://msdn.microsoft.com/en-us/library/bb386382.aspx?ppud=4

    Best Regards.


    Haixia
    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.

    • Marked as answer by Haixia_Xie Monday, April 22, 2013 8:37 AM
    Monday, April 15, 2013 1:38 AM