Invoking Microsoft IE in C# -- some questions

I

imranisb

Hi,

I apologies if this type of question was posted before.

I am invoking internet explorer and open the HTTPS website from my c#
application like this:

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
System.Diagnostics.Process.Start("IEXPLORE.EXE", "https://
10.206.207.208/abc/xyz");

I have 2 questions that are mention below:

1. How can i programmatically give username and password before
invoking IE opening an HTTPS website?

2. In IE, we can see the folder view by going File -> Open -> Open as
Web Folder. How can i invoke this programmatically directly in IE?

Thanks in advance.
 
F

Frank Uray

Hi

Maybe you can try this:

System.Net.HttpWebRequest local_httpWebRequest =
(System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create("URL");
local_httpWebRequest.Proxy.Credentials = new
System.Net.NetworkCredential("ProxyUsername", "ProxyPassword");
local_httpWebRequest.Credentials = new
System.Net.NetworkCredential("NetworkUsername", "NetworkPassword");
local_httpWebRequest.PreAuthenticate = true;
System.Net.HttpWebResponse local_httpWebReponse =
(System.Net.HttpWebResponse)local_httpWebRequest.GetResponse();

Regards
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top