Hi,
I have a project that calls a web service that is in another project,
but on the same server. I make the reference to the web service using
localhost (for example,
http://localhost/ProjectB/services/MyWebServices.asmx is the reference
within the project) as the domain, and it works fine in development as
well as a development server. However, when I move it to a production
server, I receive the following error:
The request failed with HTTP status 400: Bad Request.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with
HTTP status 400: Bad Request.
I do not receive this message if I replace localhost by the actual
domain of the server (e.g.,
http://mydomain.com/ProjectB/service...bServices.asmx works, but
replace mydomain.com with localhost and I get the error).
However, this is not a feasible solution as it would require two
different web service references, one for development (localhost) and
one for production (the domain of the server).
Any advice or suggestions is greatly appreciated!
Thanks,
Elias