Stuck with launching IE from Web App

J

James N

PROBLEM # 1:
-----------------
I am trying to launch a website in IE on the server from a C#/ASP.NET
web service. I am using the System.Diagnostics namespace and the
Process class methods. The IE process DOES seem to be running (since
there are IExplore.exe entries in the Task Manager), but no matter what
I do, there is no window on the screen (I cant see it). Here's the
code:

<code>
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName= @"C:\Program Files\Internet
Explorer\IEXPLORE.exe";
proc.StartInfo.Arguments="http://www.mysite.com";
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
proc.Start();
</code>

From what I've seen online, some ppl claimed to have done it
successfully while others said it is not possible to execute
applications from a web-based application (<a
href="http://www.dotnet247.com/247reference/msgs/20/103726.aspx">See
Here</a>). Can someone please confirm if it is really possible or not?

I do notice that all the IE processes in the Task Manager that my web
service "runs", the user is "NETWORK SERVICE", while the user for the IE
process that I manually open is "Administrator". Is this enough proof
that it is not possible. I would like to know how some ppl were able to
do it.

PROBLEM # 2
----------------
Well, the fact that the IE application does run in a hidden manner
(Problem # 1) is actually more preferable for me <b>IF</b> there is some
why that I can save the HTML file that is supposedly loaded into IE.
For example, if I could actually see the IE window, I would write a
script that would select FILE -> SAVE AS and so on...
However, without seeing the window, is there a way I can save the HTML
file being "displayed"?
 
J

James N

Thanks for your help. However, I already saw that MS article. And I
already tried it. It didn't work because I later realize that it's only
for II 5.0. IIS 6.0 uses a different worker process scheme. I havent
been able to find any similar article for II6 yet.
 

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

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top