views:

1942

answers:

2

Hello, i m using a webbrowser control in wpf to show a virtualearth map, but because i m developing behind a proxy of my company, every time i try to see the map, i have to inser my credetials, i would like to insert them automacly in the c# code, how can i achive that?

i alreadt try in the navigating event of the web broweser using:

void webBrowser_Navigating(object sender, NavigatingCancelEventArgs e) { //NetworkCredential credential = new NetworkCredential("u007239", "**", "**"); //e.WebRequest.Proxy.Credentials = credential;

}

But this dosent work because i m getting that e.webrequest is a null object.

all the help is welcome, best regards

RUi portugal

A: 

Can you not just put the following in your app.config?

<configuration>
  <system.net>
    <defaultProxy useDefaultCredentials="true" enabled="true"></defaultProxy>
  </system.net>
</configuration>
deepcode.co.uk
A: 

Did you find a resolution to this problem RUI? I need to figure out how prevent a user from opening internet explorer while viewing bing maps or if a user does have bing maps open, how do prompt a user for credentials when they open internet explorer?

Nick. .U.S