RadMap not authenticating with Proxy

4 posts, 0 answers
  1. Tom
    Tom avatar
    4 posts
    Member since:
    Oct 2010

    Posted 21 Dec 2011 Link to this post

    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
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 23 Dec 2011 Link to this post

    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 >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Jason D
    Jason D avatar
    72 posts
    Member since:
    Jan 2011

    Posted 12 Mar 2013 Link to this post

    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.
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 15 Mar 2013 Link to this post

    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.

Back to Top