Empty MapView on some machines

3694
18
Jump to solution
09-20-2021 08:59 AM
AdrianPlatte
New Contributor III

I'm having a strange issue that only occurs on some machines: I get an empty MapView.

I've made a .NET Framework 4.8 WPF UserControl library with a WPF user control that hosts a MapView (Esri SDK v100.11) and other standard controls. Then I've created a Windows Forms library with a Windows Forms user control that hosts my WPF control, so I can use it from a Windows Forms application. Then I add the deloyment requeriments listed at https://developers.arcgis.com/net/license-and-deployment/deployment/#runtime-dlls-and-resources-for-... to my binaries.

On some machines, the app works perfect. On some other it shows nothin where the MapView should be. I can see all the other controls included in my WPF User Control. The MapView control must be there, since the logs are showing activity on MapView events (MouseLeftButtonDown, MouseMove, MouseLeftButtonUp, MouseLeave, etc) and also on layers (I use an ArcGISTiledLayer and some FeatureLayers, and I can see their loading is working: LoadStatus changes from NotLoaded to Loading, and finally to Loaded. On these machines I can open a browser and load any of the layer URLs with no problem.

The only other way I found to reproduce the same behaviour (blank or empty MapView) is disconnecting from the arcGIS server or using a fake URL for the layer ArcGISTiledLayer.

I'm pretty sure it's not the code, since I'm testing using the same binaries. I'm starting to think it could be they are in different networks, though I have one exception on that (one machine on the same network as the ArcGIS that shows the same behaviour, but it could be because it's a Windows Server).

BTW, all machines are accessed using Windows Remote Desktop.

0 Kudos
18 Replies
dotMorten_esri
Esri Notable Contributor

By local data I meant a Tile Package TPK, Vector Tile package, map package, shape file or similar.

0 Kudos
AdrianPlatte
New Contributor III

Hello again, dotMorten.

Sorry for the delay. We have tried cloning one of the VMs and changing its IP address to one inside the same subnet of the ArcGIS server. The maps are showing correctly.

According to our sysadmin, who manages the firewall on our side (where the VMs don't show the map), there's no rule restricting traffic to/from the other subnet. That fits with the fact I'm seeing the feature layers load correctly and have features in it.

It looks like the issue is getting the layers to paint.

What should we be looking for in the traffic exchange, appart from the 8399 port? I have to add we have no control over the ArcGIS server itself, it was already running for the old application, and we are trying to implement the same behaviour it already does without having to affect the ArcGIS server.

Thank you, and kind regards,

Adrian

0 Kudos
dotMorten_esri
Esri Notable Contributor

The only ports that are used are http (80) and https (443). If moving to a different subnet fixes the issue, I don't think your issue is related to the runtime specifically, but a system settings issue. There's nothing "fancy" in the runtime itself. It's just standard HttpClient web requests being made.

0 Kudos
AdrianPlatte
New Contributor III

BTW, I guess that connecting from WPF SDK 100.11.2.0 to an ARCGIS server with REST API 10.5 SP5 should not be the issue (it doesn't appear to be an issue when I connect from the VMs on the same subnet)

Regards,

Adrian

0 Kudos
AdrianPlatte
New Contributor III

Hello,

I've gained access to the ArcGIS server, it's a Windows 2003 Server with Windows Firewall service stopped and marked as manual startup. The first thing I've noticed it is not capable to ping the VMs on the other subnet, that could be related to my issue.

Best regards,

Adrian

0 Kudos
AdrianPlatte
New Contributor III

Hello again,

I know very little or nothing, about administering an ArcGIS server, but is it possible that the ArcGIS server has a whitelist of clients or network masks that can consume ArcGIS services?

I see no firewall on the server that can be blocking certain client requests or server responses, so it makes me wonder if there's such white/blacklist configuration.

Best regards,

Adrian

0 Kudos
AdrianPlatte
New Contributor III

Hello,

Finally, I got it solved. I don't know why, but it looks like this line was causing the problem:

this.m_MapView.Map = new Map(BasemapStyle.ArcGISTopographic);

Just changing it to:

this.m_MapView.Map = new Map();

did the trick.

I still don't know why the issue only happened on some machines, and never in other ones, but I give up in trying to understand it.

Hope that helps,

Adrian

0 Kudos
ParhatM
New Contributor II

Hi Adrian,

Interestingly your solution solved my problem too. I had a MapView not loading properly before (with Powered by ESRI on the bottom showing). But it worked fine after making exact same changes. 

By the way, mine was a single workstation with Windows 10:

Esri.ArcGISRuntime" Version="100.15.0"

.NET framework 6.0

 

Thanks.

0 Kudos
AdrianPlatte
New Contributor III

Hi, Parhat.

I'm glad it did help you. After writing this answer I started suspecting that the issue could be caused by those machines having restricted access to the internet. Maybe creating the new Map with ArcGISTopographic style required some connection to public ArcGIS servers that our firewall was blocking only for certain machines.

Cheers,

Adrian

0 Kudos