We have a WPF windows application developed using ArcGIS Runtime and it's observed that while interacting with map multiple TCP connections are made with server and each time it opens a new TCP port(especially when tiled services are involved). Is there any way we can limit the number of TCP ports created by application ?
ArcGIS Runtime 100.10
.NET Framework 4.6.1-WPF
Windows 10 OS
You can try setting the max connections: HttpClientHandler.MaxConnectionsPerServer; However we do have a minimum of 6, otherwise you might see a big performance penalty in especially tile loading performance.
I'm curious why this is a concern? How many ports are you seeing getting opened? Also how many different layers and domains are you accessing tiled services on?
We have 3 layers, from single domain and while zoom in/out 10-15 connections are getting created.
So trying to limit the number of connections at low bandwidth.
Have you considered to move from .NET Framework to .NET 6? It uses Http2/0 for tile requests, so that might give you more benefit for low-bandwidth scenarios. The number of connections you're seeing is pretty common for multiple layers, unless you limit it more (which would also affect performance).