Unable to add reference to http://staging.common.virtualearth.net/find-30/common.asmx RRS feed

  • Question

  • We recently upgraded our dev boxes to Win7/IIS7.  Since then I am unable to add a reference to http://staging.common.virtualearth.net/find-30/common.asmx?wsdl.

    The following response is returned:

    There was an error downloading 'http://staging.common.virtualearth.net/find-30/common.asmx?wsdl'.
    The request failed with HTTP status 400: Bad Request.
    There was an error downloading 'http://staging.common.virtualearth.net/find-30/common.asmx?wsdl/$metadata'.
    The request failed with HTTP status 4400: Bad Request

    The following is returned when I attempt to update the reference I made BEFORE we migrated the apps to IIS7/W7:

    Error 1 Failed to update Service Reference 'VETokenService.Reference'.
    Error:There was an error downloading 'https://staging.common.virtualearth.net/find-30/common.asmx'.
    The request failed with HTTP status 400: Bad Request.
    Metadata contains a reference that cannot be resolved: 'https://staging.common.virtualearth.net/find-30/common.asmx'.
    The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Digest qop="auth", realm="MapPoint", nonce="78862ed12536db9b1939290821008368a1ec5a6cd47007243e7a9d91b3f7"'.
    The remote server returned an error: (401) Unauthorized.(0x80131509)

    I have seen many articles regarding this and similar topics, but have not been able to get a fix in place.

    Any help would be greatly appreciated -


    • Edited by Seevo315 Wednesday, August 4, 2010 2:46 PM More Info
    Wednesday, August 4, 2010 2:28 PM


All replies

  • The following steps provided courtesy of a tanoshimi post seemed to have at least let me get my project built:

    I gave up in the end trying to use the 'Add Web Reference' / 'Add Service Reference' and just used wsdl.exe and svcutil.exe to generate the proxy classes manually instead.

    Run the following from a command prompt in your .NET project directory:
    wsdl.exe /l:CS /n:VECommonService /u:YOURVEID /p:YOURVEPASSWORD http://staging.common.virtualearth.net/find-30/common.asmx?wsdl

    This will generate a .cs file that you can then include in your project by using Add Existing Item -> CommonService.cs. Be sure to include a reference to the VECommonService namespace in your main file to be able to use the token methods within this proxy.

    You use basically the same method but with svcutil.exe to generate proxy classes for the WCF services (RouteService, GeocodeService, ImageryService etc.)

    I'm currently writing up a "beginner's guide" to the Virtual Earth Web Services and am planning to submit it to viawindowslive.com (I know that there are some excellent code samples out there already by people like RIchard Brunditt and Chris Pendleton, but I don't think they go into the details of actually how to set up your Visual Studio project and how to resolve problems like the one described in this thread). Hope this helps.

    Wednesday, August 4, 2010 3:50 PM
  • http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/710f23c2-7003-460e-bc2d-2556c9c1c454/


    On a related note, there is really no reason to use the token service. It is kept around for compatibility with current applications, but should expect that it will be phased out. The application key system was introduced as a replacement and it is recommended to use this instead, as applications perform better (fewer web service calls) and access to what is considered "production" data.

    Wednesday, August 4, 2010 5:17 PM