Using a WmsRasterLayer with Map Suite 8.0 (without problems) I have been connecting to a WMS server setting WmsRasterLayer.Uri to :
http:
//<server>/Services/wmsserver.ashx?username=<user>&password=<pw>
The resulting http request then looks like :
http:
//<server>/Services/wmsserver.ashx?username=<user>&password=<pw>&REQUEST=GetMap&BBOX=<values>&FORMAT=image/png&HEIGHT=498&....<etc>
When I upgrade to Map Suite 9.0 the exact same code result in following request:
http:
//<server>/Services/wmsserver.ashx?username=<user>&password=<pw>?&REQUEST=GetMap&BBOX=<values>&FORMAT=image/png&HEIGHT=498&....<etc>
Pay attention to the extra '?' after the password in the base uri.
I expect the Map Suite is inserting the extra '?'
Then I changed WmsRasterLayer.Uri to following :
http:
//<server>/Services/wmsserver.ashx
Then I get NullReferenceException (details added at attachment) when calling ThinkGeo.MapSuite.DesktopEdition.WinformsMap.Refresh()
The exception happens before any call to the WMS server.
I have also tried (but getting same exception) adding username and password as parameters on layer like :
WmsRasterLayer worldLayer =
new
WmsRasterLayer();
worldLayer.Uri =
new
Uri(<WMS server uri>);
worldLayer.Parameters[
"username"
] = <user>;
worldLayer.Parameters[
"password"
] = <pass>;
I have even tried (but also getting same exception) setting WmsRasterLayer.Credentials to :
var nc =
new
NetworkCredential(<user>, <pass>);
What possibilities do I have to add username and password to http request when Map Suite 9.0 is adding '?' to base uri ?
Thanks a lot in advance