POST
|
Please refer my previous question in the link given below. https://community.esri.com/message/858968-re-issue-in-accessing-wms-layers-in-arcgis-api-31-for-silverlight?commentID=858968&et=watches.email.thread#comment-858968 I am trying to add WMS layer published on GeoServer using the code given below var wmsLayer = new WmsLayer() { ID = "highways:sp_health_dh", Url = "https://tnssdi.tn.gov.in/geoserver/wms", SkipGetCapabilities = false, Version = "1.1.1", Opacity = 0.7, DisplayName = "District Hospitals", Layers = new string[] { "highways:sp_health_dh" } }; map.Layers.Add(wmsLayer); When I try to run the application, received the following error. Unhandled exception at line 159, column 14 in http://localhost:60414/epathaigis.aspx 0x800a139e - JavaScript runtime error: Unhandled Error in Silverlight Application Code: 4004 Category: ManagedRuntimeError Message: System.Security.SecurityException: A security exception occurred while trying to connect to the 'WMS' service. Make sure you have a cross domain policy file available at the root for your server that allows for requests from this application. If not, use a proxy page (handler) to broker communication. ---> System.Security.SecurityException ---> System.Security.SecurityException: Security error. at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult) at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassa.<EndGetResponse>b__9(Object sendState) at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__0(Object sendState) --- End of inner exception stack trace --- at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result) at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result) --- End of inner exception stack trace --- at ESRI.ArcGIS.Client.Layer.OnInitializationFailed(EventArgs e) at ESRI.ArcGIS.Client.Layer.Initialize() at ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer.client_DownloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e) at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e) at System.Net.WebClient.DownloadStringOperationCompleted(Object arg) To resolve the error, I added crossdomain.xml in the root folder where the layers are published. Still I am getting the same error. How can I resolve the above issue?
... View more
07-11-2019
02:22 AM
|
0
|
0
|
2736
|
POST
|
Thanks for the reply. ToolkitDataSources issue is resolved. Now I am trying to add WMS layer published on GeoServer using the code given below var wmsLayer = new WmsLayer() { ID = "highways:sp_health_dh", Url = "https://tnssdi.tn.gov.in/geoserver/wms", SkipGetCapabilities = false, Version = "1.1.1", Opacity = 0.7, DisplayName = "District Hospitals", Layers = new string[] { "highways:sp_health_dh" } }; map.Layers.Add(wmsLayer); When I try to run the application, received the following error. Unhandled exception at line 159, column 14 in http://localhost:60414/epathaigis.aspx 0x800a139e - JavaScript runtime error: Unhandled Error in Silverlight Application Code: 4004 Category: ManagedRuntimeError Message: System.Security.SecurityException: A security exception occurred while trying to connect to the 'WMS' service. Make sure you have a cross domain policy file available at the root for your server that allows for requests from this application. If not, use a proxy page (handler) to broker communication. ---> System.Security.SecurityException ---> System.Security.SecurityException: Security error. at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult) at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassa.<EndGetResponse>b__9(Object sendState) at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__0(Object sendState) --- End of inner exception stack trace --- at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result) at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result) --- End of inner exception stack trace --- at ESRI.ArcGIS.Client.Layer.OnInitializationFailed(EventArgs e) at ESRI.ArcGIS.Client.Layer.Initialize() at ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer.client_DownloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e) at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e) at System.Net.WebClient.DownloadStringOperationCompleted(Object arg) To resolve the error, I added crossdomain.xml in the root folder where the layers are published. Still I am getting the same error. How can I resolve the above issue?
... View more
07-11-2019
02:17 AM
|
0
|
0
|
2611
|
POST
|
We have developed an ArcGIS based Web application using .net Silverlight framework (version 5). The application consumes various layers published in ArcGIS server and displays them on the map. Technologies used to develop the web application : .Net framework version – 4.0 Silverlight Version – 5.1.50901.0 ESRIArcGIS.Client – 3.0.0.146 ESRIArcGIS.Client.Toolkit - 3.0.0.146 Now we have a new requirement to consume WMS layers published in Geoserver and display the layers along with the ArcGIS layers in the same map. To consume WMS layers, we tried to install ‘ESRI.ArcGIS.Client.Toolkit.DataSources’ plug in from Nuget Package Manager. It resulted in below errors. 1. Install-Package : Unable to find package 'ArcGISSilverlight-ToolkitDataSources'. At line:1 char:16 + Install-Package <<<< ArcGISSilverlight-ToolkitDataSources + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand 2. Tried to run the command ‘Install-Package ArcGISSilverlight-All -Version 3.3.0.33’ which was found in link given below https://www.nuget.org/packages/ArcGISSilverlight-All/ Install failed. Rolling back... Install-Package : Could not install package 'ArcGISSilverlight-Core 3.3.0.33'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are comp atible with that framework. For more information, contact the package author. At line:1 char:16 + Install-Package <<<< ArcGISSilverlight-All -Version 3.3.0.33 + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand 3. Tried to add ‘ESRI.ArcGIS.Client.Toolkit.DataSources’ which was found in a sample code in Git Hub Got following error. Error 4 Assembly 'ESRI.ArcGIS.Client.Toolkit.DataSources, Version=10.2.5.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' uses 'ESRI.ArcGIS.Client, Version=10.2.5.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' which has a higher version than referenced assembly 'ESRI.ArcGIS.Client, Version=3.0.0.388, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' e:\New folder\arcgis-samples-silverlight-master\src\ArcGISSilverlightSDK\Bin\Debug\ESRI.ArcGIS.Client.Toolkit.DataSources.dll As the above plug-in is not supporting, is there any other plug-in / version of the plug-in that supports WMS layers? OR Is there any alternate solution available to implement WMS layers with Silverlight in my web application?
... View more
06-18-2019
04:28 AM
|
0
|
2
|
3701
|
POST
|
We need to use wms service to display the data in the map. I referred the websites given below. https://community.esri.com/thread/69289 http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#//017000000084000000 When I try to add ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer newLayer = new ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer(); in the code, it says Datasources does not exist in the namespace ESRI.ArcGIS.Client.Toolkit . I want to know the problem with ' ESRI.ArcGIS.Client.Toolkit ' installed in the application.
... View more
05-21-2019
09:10 PM
|
0
|
0
|
1739
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|