HTTP Error 404.0 - Not Found while trying to add a webreference in C#

Locked HTTP Error 404.0 - Not Found while trying to add a webreference in C#

  • Friday, August 17, 2012 11:35 AM
     
     

    I have created a web service in my one solution and when I try to add a reference of it to another solution I get the following error.

    HTTP Error 404.0 - Not Found

    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

    I have created it using visual studio 2008 and C#. Could someone say why this happens?

All Replies

  • Friday, August 17, 2012 2:13 PM
     
     

    If you are using is through Visual studio development server then verify if that ws project is also running, otherwise you can try adding both project in same solution.

    Or the best thing would be to try deploying your service on IIS then try adding references.


    Best Regards Sanjay Pant [Metadesign Solutions]

  • Friday, August 17, 2012 4:02 PM
     
     

    The below Questions may help you find the answer:

    1. Is your client and web service project sitting in the same solution, and in your client project you are trying to add reference? If yes, select discover the services in the solution and add reference.

    2. If your client and web service are in two different solution then publish your web service to IIS. Try to browse the service from IIS. Successfully browse will show the URL in address bar, use it while adding reference in your client project. If you can't browse service from IIS then could be a problem in your service and you should get the exception message.

    I hope this helps

  • Friday, August 24, 2012 3:45 PM
     
     

    should you check web.config  and delete webservice reference method.
    Or , should check  "[OperationContract]" in werservice.