WmtsService with 100.4

533
1
Jump to solution
01-24-2019 01:20 PM
Labels (1)
DarellStoick
New Contributor III

Trying to get the sample to work for WmtsService - arcgis-runtime-samples-dotnet/WMTSLayer.xaml.cs at master · Esri/arcgis-runtime-samples-dotnet · Git... 

// Define the Uri to the WMTS service.

Uri wmtsUri = new Uri("https://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS");

WmtsService myWmtsService = new WmtsService(wmtsUri);

await myWmtsService.LoadAsync();

the LoadAsync() throws and exception

Exception

I've tried various formats of the URL including ?request=GetCapabilities&service=WMTS and a different service but get the same error.  Please advise.

Thanks,

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DarellStoick
New Contributor III

We are using .Net 4.6.2 and the WmtsLayer class and WmtsService class appear to handle TLS protocol a bit different than other map layer types. We worked around this issue by specifying a TLS protocol.

in code

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls11| System.Net.SecurityProtocolType.Tls12;

or in the App.config

<runtime>

<AppContextSwitchOverrides value="Switch.System.ServiceModel.DisableUsingServicePointManagerSecurityProtocols=false;Switch.System.Net.DontEnableSchUseStrongCrypto=false" />

</runtime>

View solution in original post

0 Kudos
1 Reply
DarellStoick
New Contributor III

We are using .Net 4.6.2 and the WmtsLayer class and WmtsService class appear to handle TLS protocol a bit different than other map layer types. We worked around this issue by specifying a TLS protocol.

in code

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls11| System.Net.SecurityProtocolType.Tls12;

or in the App.config

<runtime>

<AppContextSwitchOverrides value="Switch.System.ServiceModel.DisableUsingServicePointManagerSecurityProtocols=false;Switch.System.Net.DontEnableSchUseStrongCrypto=false" />

</runtime>

0 Kudos