WPF - How to insert my proxy credentials into WebBrowser Control
I am using webbrowser
control
WPF to display a virtual map of the earth, but since I am developing for proxy
my company, every time I try to see the map, I have to insert my credentials.
I would like to insert them automatically into C # code, how can I achieve this?
I am already trying to execute a web browser navigation event using:
void webBrowser_Navigating(object sender, NavigatingCancelEventArgs e)
{
//NetworkCredential credential = new NetworkCredential("u007239", "****", "****");
//e.WebRequest.Proxy.Credentials = credential;
}
But that doesn't work because I get that e.webrequest
is null object
.
all help is appreciated.
+1
Rui marinho
source
to share