Sharpmap and Proxy

Topics: SharpMap v0.9 / v1.x
May 24, 2012 at 10:00 AM
Edited May 24, 2012 at 10:04 AM

 

Hi all,

 

Using this code I can access our Proxy

Dim proxyObject As IWebProxy = New WebProxy("PROXY:PORT")
proxyObject.Credentials = New NetworkCredential("USR", "PW")Dim strUrl As String = "http://www2.demis.nl/mapserver/request.asp"
Dim layWms1 As SharpMap.Layers.WmsLayer = New SharpMap.Layers.WmsLayer("Demis Map", strUrl, proxyObject)

 

I have set my proxy in IE, but I can not get it to work for this

Dim myTileLayer2 As TileLayer
myTileLayer2 = New TileLayer(New BingTileSource(BingRequest.UrlBing, "", BingMapType.Aerial), "TileLayer - Bing " & BingMapType.Aerial)
myMap.Layers.Add(myTileLayer2)

 

Does anybody know how to set the proxy explicitely?

Thanks!

 

 

 

 

Developer
May 24, 2012 at 1:02 PM

I don't know if can help you, but try to set this static property

WebRequest.DefaultWebProxy

with your proxy

May 24, 2012 at 1:23 PM

I have tried everything else, didn't help.
This does :^)

Thanks,

D

Developer
May 24, 2012 at 1:28 PM
dvh wrote:

I have tried everything else, didn't help.
This does :^)

;)