Tutorial sample does not show basemap (running behind proxy)

247
1
Jump to solution
08-04-2022 07:19 AM
cfrob
by
New Contributor II

Hello,

I'm a newbie with Esri and just trying my first steps with the Esri runtime SDK for .NET.

When I try the first tutorial ("Display a map") it fails to show the basemap. It simply shows a white area.

Essentially all I do is

Map = new Map(BasemapStyle.ArcGISTopographic);

 

I'm behind a corporate proxy -- so that could be the problem but I'm not sure.

If that's the root cause: How can I configure the runtime to use the proxy (with username and password)?

Could anything else cause that problem?

PS: I did configure the ApiKey.

Regards,
Christian

 

0 Kudos
1 Solution

Accepted Solutions
cfrob
by
New Contributor II

Hello,

so just answering my own question in the hopes that it might help someone else in the future.

As it seems one can use standard .NET mechanics to make the Runtime use a proxy.

Simply configure HttpClient.DefaultProxy before the Runtime makes any HTTP-requests.
Like this:

var proxy = new WebProxy(new Uri("http://proxy-host:8080"))
{
	Credentials = new NetworkCredential("<username>", "<password>")
};
HttpClient.DefaultProxy = proxy;

 

Regards,
Christian

 

View solution in original post

0 Kudos
1 Reply
cfrob
by
New Contributor II

Hello,

so just answering my own question in the hopes that it might help someone else in the future.

As it seems one can use standard .NET mechanics to make the Runtime use a proxy.

Simply configure HttpClient.DefaultProxy before the Runtime makes any HTTP-requests.
Like this:

var proxy = new WebProxy(new Uri("http://proxy-host:8080"))
{
	Credentials = new NetworkCredential("<username>", "<password>")
};
HttpClient.DefaultProxy = proxy;

 

Regards,
Christian

 

0 Kudos