Answered by:
The request failed with HTTP status 400: Bad Request.?

Question
-
why i am facing this error when add reference to...
https://staging.common.virtualearth.net/find-30/common.asmx?wsdl
error
There was an error downloading 'https://staging.common.virtualearth.net/find-30/common.asmx?wsdl'.
The request failed with HTTP status 400: Bad Request.
how i can solve this error????????????????Thursday, December 10, 2009 10:03 AM
Answers
-
Have you tried going to that URL in a browser? Can you access it?
The common service is a password-protected WSDL, so you will have to supply your Bing Maps Developer Account ID and password - are these correct?
Are you creating the reference using Visual Studio "Add Web Reference", or using wsdl.exe? (Or svcutil.exe?)
Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290- Proposed as answer by Ricky_BrundrittModerator Thursday, April 15, 2010 10:01 PM
- Unproposed as answer by A Amit Friday, April 30, 2010 3:54 AM
- Marked as answer by A Amit Friday, April 30, 2010 3:54 AM
Thursday, December 10, 2009 10:56 AMModerator -
You'll need to use the wsdl.exe tool and generate it manually to add to the project. The steps are described in the following thread by Mr. Tanoshimi himself.
http://social.msdn.microsoft.com/forums/en-US/vemapcontroldev/thread/362b66ce-6c94-4cb1-8457-5b09dc94c0ff- Proposed as answer by Ricky_BrundrittModerator Thursday, April 15, 2010 10:01 PM
- Marked as answer by Ricky_BrundrittModerator Wednesday, August 4, 2010 8:22 PM
Thursday, December 10, 2009 1:43 PM -
Open the Visual Studio 2005 Command Prompt (Start->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt)
Change to an accessible directory, such as desktop.
Type this:
wsdl /username:yourid /password:yourpw http://staging.common.virtualearth.net/find-30/common.asmx
Switch back to your VS2005 project. Right click on the project and choose Add->Existing Item.
Navigate to the file that was just generated. It should be CommonService.cs.
Now you can use the CommonService just as if you had added the web reference.- Proposed as answer by Ricky_BrundrittModerator Thursday, April 15, 2010 10:01 PM
- Marked as answer by Ricky_BrundrittModerator Wednesday, August 4, 2010 8:22 PM
Thursday, December 17, 2009 10:50 PM
All replies
-
Have you tried going to that URL in a browser? Can you access it?
The common service is a password-protected WSDL, so you will have to supply your Bing Maps Developer Account ID and password - are these correct?
Are you creating the reference using Visual Studio "Add Web Reference", or using wsdl.exe? (Or svcutil.exe?)
Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290- Proposed as answer by Ricky_BrundrittModerator Thursday, April 15, 2010 10:01 PM
- Unproposed as answer by A Amit Friday, April 30, 2010 3:54 AM
- Marked as answer by A Amit Friday, April 30, 2010 3:54 AM
Thursday, December 10, 2009 10:56 AMModerator -
yes i tried to access in browser and i access it in browser.
but when i try to Add Web Reference in VS 2005 i got error.Thursday, December 10, 2009 11:56 AM -
You'll need to use the wsdl.exe tool and generate it manually to add to the project. The steps are described in the following thread by Mr. Tanoshimi himself.
http://social.msdn.microsoft.com/forums/en-US/vemapcontroldev/thread/362b66ce-6c94-4cb1-8457-5b09dc94c0ff- Proposed as answer by Ricky_BrundrittModerator Thursday, April 15, 2010 10:01 PM
- Marked as answer by Ricky_BrundrittModerator Wednesday, August 4, 2010 8:22 PM
Thursday, December 10, 2009 1:43 PM -
I am used all above things but th result is same. and can add reference of
https://staging.common.virtualearth.net/find-30/common.asmx?wsdl
or
http://staging.common.virtualearth.net/find-30/common.asmx?wsdl
in application my password and log in name is correct and it work in browser but when i am adding reference in
visual studio i am getting same error.
Thursday, December 17, 2009 12:54 PM -
Open the Visual Studio 2005 Command Prompt (Start->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt)
Change to an accessible directory, such as desktop.
Type this:
wsdl /username:yourid /password:yourpw http://staging.common.virtualearth.net/find-30/common.asmx
Switch back to your VS2005 project. Right click on the project and choose Add->Existing Item.
Navigate to the file that was just generated. It should be CommonService.cs.
Now you can use the CommonService just as if you had added the web reference.- Proposed as answer by Ricky_BrundrittModerator Thursday, April 15, 2010 10:01 PM
- Marked as answer by Ricky_BrundrittModerator Wednesday, August 4, 2010 8:22 PM
Thursday, December 17, 2009 10:50 PM -
it still same behavior and when i try to copy from Open the Visual Studio 2005 Command Prompt (Start->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt) that show unauthorized user but when i try same password and user name in browser i a able to access it .
why i can copy this from command prompt and why it not accessible inn VS when add it in as web reference.
thank uSaturday, December 19, 2009 9:50 AM -
I'm guessing here, but does your username or password contain any "unusual" characters? (i.e. non-ASCII, unicode, language-specific characters etc.)
What country/culture is your system/browser set to? e.g. en-US?
Just wondering if it's something to do with the way that the username/password gets serialized from Visual Studio, and whether it's failing to correctly send a non-standard character...
Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290Saturday, December 19, 2009 11:29 AMModerator -
thanx Tanoshimi for replying my user name and password is correct and i am not used any unusual character ?
and i am able to view it browser but when add it in application it throw this error.
i am also try by goolging but i can not got any result for this problem.
please help me if some body know solution.
thank youWednesday, December 30, 2009 5:40 AM -
Have you tried using an application key instead of client tokens? This will make for faster loading times and does not require a reference to the common service.
Windows Live Developer MVP - http://rbrundritt.spaces.live.comTuesday, January 12, 2010 12:55 PMModerator