none
Two different WebExceptions when attempting connection to web service when network not available RRS feed

  • Question

  • Hi all,

    I have a desktop application (actually an Outlook add-in) that connects to an asmx webService to obtain data. I had an issue where when the add-in attempts to connect to the service it throws an exception with the message "The remote name could not be resolved: 'www.serviceservername.com'".

    I surmised that it would be a network connectivity (or lack of) issue, and when I tried to simulate it by unplugging my network cable (the add-in - in outlook - was already running perfectly), I got the exception message "The request was aborted: The operation has timed out.". But if I unplug the network and THEN run the add-in (open outlook), I get the "remote name could not be resolved" exception.

    I would be very grateful if someone could explain to me why I am getting two different exceptions for the same issue!?

    Cheers,

    Thimila

    Wednesday, October 23, 2013 10:35 PM

Answers

  • Hi,

    The "remote name could not be resolved" exception is a general error. Many reasons can cause this error, so when we meet get this exception, it is hard to find the root cause.
    "The request was aborted: The operation has timed out." is a description error for the "remote name could not be resolved" exception. With this "The request was aborted: The operation has timed out." error, we can easy find the solution to solve problem. Maybe we can increase the operation timeout or others.

    It just like that some people say that "you are wrong", if only that single world, you will not know where you are wrong. But if some people say that "you can not smoke in this place", then you can easy correct your bad behaviour. So it is same as the relationship with "remote name could not be resolved" and "The request was aborted: The operation has timed out."

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Friday, October 25, 2013 4:46 AM
    Moderator