AnsweredAssumed Answered

WmsLayer rendering '?&' in URL leads to 400 response

Question asked by berndku on May 5, 2015

I try to integrate the following WMS-Server with the .NET Runtime SDK:

http://www.geodienste-hamburg.de/HH_WMS_DOP20

 

The layer does not render. Fiddler shows the following error:

 

Missing HTTP version in request: 'GET /arcgis/services/GBD_Image/DOP20/MapServer/WmsServer?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:25832&BBOX=526006.37044593529,5928791.5756696593,5666...

 

The reason seems to be the & in front of the SERVICE-Parameter in the URI that the .NET SDK is using to fetch the tiles:

http://www.geodienste-hamburg.de/HH_WMS_DOP20?&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:25832&BBOX=526006.37044593529,5928791.5756696593,566601.08467535337,5954643.5286785625&WIDTH=1363&HEIGHT=868&LAYERS=1&STYLES=&EXCEPTIONS=XML&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE

 

If the '&' is removed, the tile can be retrieved without any issues:

http://www.geodienste-hamburg.de/HH_WMS_DOP20?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:25832&BBOX=526006.37044593529,5928791.5756696593,566601.08467535337,5954643.5286785625&WIDTH=1363&HEIGHT=868&LAYERS=1&STYLES=&EXCEPTIONS=XML&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE

 

 

Is this a bug in the ArcGIS .NET SDK ?

Any workaround to make WmsLayer prohibit rendering the problematic '&' ?

Outcomes