Select to view content in your preferred language

Display a map WPF App: Map is blank - No such host is known error

360
2
Jump to solution
02-11-2025 09:44 AM
bwl
by
New Contributor

Hi.  I'm new to this and trying to follow the display a map tutorial: 

https://developers.arcgis.com/net/maps-2d/tutorials/display-a-map/

All seems to be good until I run the app at which time I see a blank, white map with the "powered by esri" label at the bottom.  The output window has the following errors:

ArcGIS Maps SDK: Load Error: Basemap
System.Net.Http.HttpRequestException
No such host is known. (basemapstyles-api.arcgis.com:443)
ArcGIS Maps SDK: Load Error: Map
System.Net.Http.HttpRequestException
No such host is known. (basemapstyles-api.arcgis.com:443)

before starting, I created a Location Platform Account and API Key as per the tutorials.

Any idea where the issue may be?  

Thanks.

0 Kudos
1 Solution

Accepted Solutions
pnarkhede
Esri Contributor

Hi there,

It sounds like the SDK isn’t able to reach Esri’s basemap styles service, which is why you’re seeing the “No such host is known” error. This error typically indicates that the client can’t resolve or reach the hostname.

Here are a few things to check:

  1. Verify that your machine has a stable Internet connection and isn’t behind a firewall or proxy that might be blocking requests.
  2. Even though the error is DNS-related, it’s always good to double-check that your API key is set correctly in your App.xaml.cs file.
  3. Try clearing DNS cache to resolve connectivity problem.
  4. If the issue persists, try using another basemap style in case there's a temporary issue with the default one.

 

Map = new Map(BasemapStyle.ArcGISImagery);

 

Let us know if these steps help or if you need further assistance.

View solution in original post

2 Replies
pnarkhede
Esri Contributor

Hi there,

It sounds like the SDK isn’t able to reach Esri’s basemap styles service, which is why you’re seeing the “No such host is known” error. This error typically indicates that the client can’t resolve or reach the hostname.

Here are a few things to check:

  1. Verify that your machine has a stable Internet connection and isn’t behind a firewall or proxy that might be blocking requests.
  2. Even though the error is DNS-related, it’s always good to double-check that your API key is set correctly in your App.xaml.cs file.
  3. Try clearing DNS cache to resolve connectivity problem.
  4. If the issue persists, try using another basemap style in case there's a temporary issue with the default one.

 

Map = new Map(BasemapStyle.ArcGISImagery);

 

Let us know if these steps help or if you need further assistance.

bwl
by
New Contributor

Thanks for reply.  I believe I've ruled out 2, 3, and 4.   I was trying this on my office network where there is indeed a proxy server, so I think that is cause.  Also, I tried the same tutorial on my home machine and it worked fine.  Looks like I will need to look into if there is a way to work around the proxy issue.  

0 Kudos