Pwd protected WMS; TK dll v2.4API; UI in 3.2API

3054
2
07-06-2015 10:05 AM
Ravichandran_M_Kaushika
Occasional Contributor

dear Readers,

good morning. thank you for taking the time to read this article. we have a working SL app in production. the app development started with ESRI API 1.0 and was upgraded to the latest API as needed.   The end users were interested in the toolbar that had arcmap look and feel that was deprecated after v2.x.  For such user community, ESRI was kind enough to create a dll

ESRI.ArcGIS.Client.Toolkit.DataSources.dll (v2.4 - 2.3.0.2440) based of toolkit source 2.4 from Codeplex (or a similar code repository).

The app is working great till we are trying to do the following:

1. add a wms layer from a different domain (over the internet) that requires unique userid and password due to the sensitivity of imagery.  the imagery available from the outside source is available for the entire nation.

we have not heard from the provider about using a common app based user id /password like we use for the app to communicate with the database.  they are examining the request and have not responded.

2. while trying to use the sample page's wms example,

UI (esri.ArcGIS.client dll version = 10.2.1.0 (v 3.2)

Toolkit.Datasources dll version = 2.3.0.2440 (v2.4)

As the application steps into the following function - from the place where the following is called:

private void AddWMSTest()
{
WmsLayer wmslayerTest = new WmsLayer();

wmslayerTest.Url = "https://Outside.ServiceProvider.com/mapservce/wmaccess";

MyMap.Layers.Add(wmslayerTest);

}
0 Kudos
2 Replies
Ravichandran_M_Kaushika
Occasional Contributor

Some how the editor quit on me ... but luckily got my information through... when I am trying to call the AddWMSTest() from the code, it gives me the following error:

System.TypeLoadException was unhandled by user code Message=Method 'GetUrl' in type

Esri.ArcGIS.client.toolkit,datasources.wmslayer from assembly.... *.DataSources, version 2.3.0.24400 *** does not have an implementation.

Right now, I do not know whether this is a old dll mashup with new dll issue.

This is over and beyond the user id password requirement of the external domain issue.

any help would be greatly appreciated.

regards

ravi.

0 Kudos
YueWu1
by Esri Regular Contributor
Esri Regular Contributor

Hi Ravichandran,

- For the unhandled error from Visual Studio, one thing for sure is when add WSMLayer this Class, you definitely need to make sure all ESRI dll comes from the same version. Since WmsLayer Class from ESRI.ArcGIS.Client.Toolkit.DataSources, therefore you need to import both “ESRI.ArcGIS.Client” and “ESRI.ArcGIS.Client .Toolkit.DataSources” references are the same version. The path for the dll should under this path, “…\Program Files (x86)\ESRI SDKs\Silverlight5\v3.2”

Here is a screenshot for the references:Capture.JPG