473,395 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

400: Bad Request On Web Service Call

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

Nov 21 '05 #1
1 12676
On Mon, 12 Jul 2004 14:05:36 -0700, Elias wrote:
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!


Elias,

You know you can change the URL that the web service connects to at
runtime, right?

In my app, I have a simple form that allows me to select the URL I want to
use at runtime. Or, you could read it from a config file.

Just do myWebService.Url=<whatever>.

Richard.
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: turnit \(removethis\) | last post by:
I have a login form that uses the post method to carry the information to the next page. The form works just fine in ie6.0, but fails in mozilla and fails in ie5.2 on a mac. "HTTP/1.1 400 Bad...
4
by: vigori | last post by:
I have an application that send a file to a web service (I built both the application and the web service) I set the max file size via web.config of the web service: <httpRuntime...
4
by: Sean Feldman | last post by:
Hi, I'm expiriencing something interesting with my web service & desktop client application. When running desktop client on Windows XP or Windows 2003 everything works just fine. But when doinf...
0
by: jimmyfishbean | last post by:
Hi, I am using ASP.NET (framework 1.1), Windows 2003, IIS 6.0. I have a VB.NET web service client that connects/calls a web service written in ASP.NET (both applications are installed on the...
2
by: ashwinks | last post by:
Hi, I have developed a NT Service that calls upon a web service outside the corporate firewall and passes data to it, and receives data in return. Now the data that is sent to the web service...
0
by: =?Utf-8?B?SWFu?= | last post by:
Not sure whether this should be posted here or eleswhere: I'm using WebDAV to access exchange server mailboxes from an ASP.NET web service. The web service is configured with the...
2
by: bepnewt | last post by:
Hello! I'm trying to connect to different sites using an HttpWebRequest object and some of them return an Error 400. If you navigate to it in a normal browser, it works fine. This is an example...
0
by: =?Utf-8?B?b2xkVkIzcg==?= | last post by:
I get HTTP status 400 - Bad Request when I send the following Soap envelope to a local WCF web service. If I either remove both the To and Action elements or the whole Header element, I get a good...
1
by: JohnH | last post by:
Hi, In my application which has two or more threads calling web service or just HttpWebRequest I am seeing some HTTP 400 errors retrun in the response. All the calls are going through the same ISA...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.