Domain name or IP Address is changes while invoking Webservice RRS feed

  • Question

  • Hi ,

    I Have a ASP.NET ASMX webservice hosted on server (Webserver).

    When I am browsing the webservice on browser it displays all the webmethods.

    And when i invoke any webmethod the url changes from ip address or domain name to host name.

    Eg : my Webservice URl is http://MyDomain/Myservice/Service.asmx

    And when i invoke the webmethod it changes the domain name in URL :  Url looks something like this


    Since the URL is not accessible with hostname  no XML output is displayed.

    In order to resolve the same i have mapped the IP and the host name in servers host file but no luck.

    Your help for resolving the same will be greatly appreciated.

    Thank You

    Rohit Naik

    Thursday, May 21, 2015 12:05 PM


  • Hi Everyone,

    I have managed to resolve the issue by adding mapping of IP address and host name in the host file of the system from where i am invoking the service.

    Other option is instead of consuming the web service through http POST Use http GET.

    Thank You,


    • Marked as answer by Rohit K Naik Friday, May 22, 2015 2:15 PM
    Friday, May 22, 2015 8:25 AM