Hi, all,
I'm new to the ESRI Silverlight API, and I've run into a bit of a problem. I'm trying to add WMS layers to my Silverlight app dynamically (read that as without specifying them in the XAML). I've successfully added dynamic and tiled map layers with no problems, but I run into a problem when adding WMS layers. WMS Layers from ArcGIS server don't seem to have a problem, but I get exceptions when adding third party WMS layers.
Here is the code for the setup of the layer
WmsLayer newLayer = new WmsLayer();
newLayer.Url = services.url;
newLayer.Initialized += new EventHandler<EventArgs>(newLayer_Initialized);
newLayer.ID = services.ServiceName;
newLayer.Layers = new String[0]; //this makes all layers invisible
Map.Layers.Add(newLayer);
When the layer is initialized, I end up with this exception:
Code : 4004
Message : System.Security.SecurityException: A security exception occurred while connecting to the WMS service.
I've taken that to mean, after doing a little reading, that I need to connect using a proxy, since MS has locked a lot of this type of thing down. I set the proxyUrl to my proxy I use for GeoRSS feeds, and I get this exception :
Invalid URI: The format of the URI could not be determined.
If anyone out there has a clue as to what I'm doing wrong, please let me know.
Thanks
Joe White