VERIFIED SOLUTION i
X

Resolve error "The remote server returned error 400" when connecting to a Secure WMS in MapXtreme 8.0

Issue

When connecting to a Secure WMS with MapXtreme then the following error is encountered "The remote server returned error 400" when you request more than one layer to be returned.

Cause

When connecting to a secure WMS you will need to specify the secure WMS login credentials in the request sent to the secure WMS.

Resolution

UPDATED: August 16, 2017


 If you wish to connect to a secure Server then you will need to use the code below to set the credentials:

WmsRequest request = WmsClientUtilities.GetMapRequest(version, getWmsMapRequest(), _userDefinedParameters);
request.Credentials = new System.Net.NetworkCredential("XXXXX", "YYYYY");

Where XXXX is the User and YYYYY is the password.

Environment Details

Product Feature: Web Services

 

Downloads

  • No Downloads