This is a migrated thread and some comments may be shown as answers.

RadMap not authenticating with Proxy

3 Answers 139 Views
Map
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 21 Dec 2011, 09:28 AM
Hi guys,

We are a Bing Maps user, and I'd like to make use of the RadMap control to present maps in our .net 4.0 winforms apps.  The problem I'm having is that the internet traffic has to go through a proxy server.  The RadMap control appears to be picking up the proxy settings and is directing its traffic through it, but its presenting 'anonymous' credentials to the proxy, rather than using the current user's domain credentials.  As such, the requests are being denied and no map tiles are returned.

I've tried setting the current thread principal to a new Windows Principal, based on the currently authenticated user, but that hasn't helped...

Any suggestions?

Best regards,

Tom

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 23 Dec 2011, 04:03 PM
Hi Tom,

We use the WebClient class in our WPF implementation of the RadMap control for downloading map tiles. By default it uses proxy settings from the application / system configuration and the Internet Explorer Local Area Network settings (http://msdn.microsoft.com/en-us/library/system.net.webclient.proxy.aspx). But it seems it does not use the default user credentials for proxies which require authentication.

I think you can change the app.config (or exe.config) file of your application for specifying the parameters for default proxy. You can add the defaultProxy settings like the following :
<configuration>
 <system.net>
  <defaultProxy useDefaultCredentials="true"/>
 </system.net>
</configuration>

For more information you can take a look at the following MSDN documentation topic:
http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx
Also it could be helpful to look at the following conversation about this problem:
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/83bafcd0-5bab-4cb9-96cf-a53ce132c7ab

Regards,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Jason D
Top achievements
Rank 1
Veteran
answered on 12 Mar 2013, 04:00 PM
There was no reply to this, so I thought I'd confirm this does work. I added the XML to our exe.config and RadMap now works with a proxy. This was the first time we've encountered a proxy with our software. However, I'm not sure how to handle the issue where the user needs to logon to the proxy using credentials different than their domain/IE settings, since RadMap is not asking for credentials in that case. IE, on the other hand, pops up a window asking you to logon to the proxy.
0
Andrey
Telerik team
answered on 15 Mar 2013, 11:21 AM
Hi Jason,

If you need to use credentials different from domain\IE settings or use some specific proxy settings then you can use approach described here:

http://stackoverflow.com/questions/186800/is-it-possible-to-specify-proxy-credentials-in-your-web-config

Regards,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Map
Asked by
Tom
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Jason D
Top achievements
Rank 1
Veteran
Share this question
or