Ah right. Close enough. Yes it's 100: https://github.com/dotnet/runtime/blob/master/src/libraries/System.Net.Http/src/System/Net/Http/Http...
Reducing the timeout would be quite dangerous. Just because you generally get a fast response, doesn't mean others will, or that there can't be network hiccups now and then. Reducing it too much would mean you quite often wouldn't get a layer failing to load even though there's nothing wrong with the service. Also if you're the first to hit a service in the morning, the server might need to start up an app pool etc, and that can take longer than usual.
> the application has just frozen
The application shouldn't be frozen but continue to work and respond. One thing you can do is to set the SpatialReference and InitialViewpoint on your Map instance explicitly before loading it - that'll enable the MapView to start rendering immediately and render whichever layers have loaded at that point. If you don't, the MapView needs to load the first layer to figure those things out, and it'll be a while before the map can start rendering, so if the first layer is slow to load, that would affect the entire view.
I'd also recommend that you use the loadstatus events to report layer status. Like a spinning circle next to each layer while they are loading, to show data is currently being fetched to start up the layer.
If you really want to cancel, you're also free to call layer.CancelLoad() after a set interval if you want to stop the loading.
Here's one way that could be done:
CancellationTokenSource tcs = null;
layer.LoadStatusChanged += (s, e) =>
{
if(e.Status == LoadStatus.Loading)
{
tcs = new CancellationTokenSource();
tcs.CancelAfter(TimeSpan.FromSeconds(5));
tcs.Token.Register(layer.CancelLoad);
}
else
{
tcs?.Dispose();
tcs = null;
}
};