Microsoft KB Archive/814307

= PRB: You Receive a &quot;401 Unauthorized&quot; Error When You Try to Invoke Microsoft MapPoint Web Service Methods =

Article ID: 814307

Article Last Modified on 11/24/2006

-

APPLIES TO


 * Microsoft MapPoint Web Service 2.0
 * Microsoft MapPoint Web Service 3.0

-





SYMPTOMS
You may receive the following error when you try to invoke Microsoft MapPoint Web service methods:

The request failed with HTTP status 401: Unauthorized.



CAUSE
There are many potential causes of this error. The following list contains some of the potential causes:
 * There is a typo in the code.
 * You use incorrect credentials (extranet credentials).
 * There are missing credentials for a Web service endpoint (FindService, RenderService, RouteService, CommonService).
 * You access a version of MapPoint .NET that the account is not authorized for.
 * You access a MapPoint .NET environment that is not valid.
 * You use an expired evaluation account.
 * You use an incorrect password.



RESOLUTION
To resolve the error, use these procedures:  Make sure that there are no typos in your code for the account ID and for your password. Verify that you are using the account ID and password that the MapPoint .NET account administrator provided to you.

The account ID is a one-digit to four-digit number, and the password is typically a random string. Do not use your extranet credentials. Your extranet credentials include a username (string) and a password (string). In the Microsoft MapPoint .NET Developer Web Services 3.0 software development kit (SDK) Web samples, the credentials are entered in the authentication model only one time in the Web.config file. However, if you use the Microsoft MapPoint .NET Basic Services 2.0 SDK Web samples, or if you write code that does not follow this model, verify that you have correctly entered your credentials for each service that you invoke (FindService, RenderService, RouteService, CommonService).

Most of the MapPoint .NET Basic Services 2.0 Web samples require that you enter credentials in multiple locations in the code. Verify that you access a MapPoint .NET version and environment that your account is authorized for, and then verify that you are accessing an environment that is valid.  Version Information: Microsoft currently operates two distinct versions of the MapPoint .NET Web service (MapPoint .NET Basic Service 2.0 and MapPoint .NET Developer Web Service 3.0). If you received your evaluation or your standard accounts after November 2003, you typically only have access to MapPoint .NET Developer Web Service 3.0. You receive the error if you try to access a version of the service that your account is not activated for. To determine which version of the service you have, examine the Web Services Description Language (WSDL) URL that you use to access the service.

See the &quot;More Information&quot; section of this article for a list of valid WSDL URLs for each version of the service. Environment Information: MapPoint .NET has two environments that function equally (Staging and Production). Production is sometimes referred to as Transaction. Evaluation accounts can only access the Staging environment. You receive the error when you use an evaluation account to access the Production servers. To determine which environment you use, examine the WSDL URL that you use to access the Web service.

See the &quot;More Information&quot; section of this article for a list of valid WSDL URLs for the MapPoint .NET environments.</li> Valid Environment: Microsoft maintains internal MapPoint .NET environments that are occasionally open to the external Internet for testing. The WSDL URLs for these test environments may be published for testing on a newsgroup or on another public venue by customers who have access for testing purposes. Most accounts that try to access these environments receive the error. Make sure that you use a correct WSDL URL to access MapPoint .NET.

See the &quot;More Information&quot; section of this article for a list of the valid WSDL URLs for MapPoint .NET.</li></ul> </li> Evaluation customers who receive the error may have an expired account. If your evaluation account is expired, send an e-mail to the MapPoint .NET Licensing Team at the following address, and request an extension:

[mailto:maplic@microsoft.com maplic@microsoft.com]

Provide a reason for the request.</li> If your password is incorrect, request a password reset by sending an e-mail to the following address:

[mailto:mpnet@microsoft.com mpnet@microsoft.com]

</li></ol>

If you still receive the error after you complete these procedures, contact Technical Support for additional assistance.

<div class="moreinformation_section">

MapPoint .NET Developer Web Services WSDL URLs
<ul> Staging:

http://staging.mappoint.net/standard-30/mappoint.wsdl

</li> Staging Secure Sockets Layer (SSL):

https://staging.mappoint.net/standard-30/mappoint.wsdl

</li> Production:

http://service.mappoint.net/standard-30/mappoint.wsdl

</li> Production (SSL):

https://service.mappoint.net/standard-30/mappoint.wsdl

</li></ul>

Keywords: kbprb KB814307

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.