Tuesday, March 13, 2012

Stuck with launching IE from Web App

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= @dotnet.itags.org."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"?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!check out this support link,
http://support.microsoft.com/defaul...kb;en-us;555134

"James N" <email_this_guy@.yahoo.com> wrote in message
news:#ssrBwuuEHA.3376@.TK2MSFTNGP12.phx.gbl...
> 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://links.10026.com/?link=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"?
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
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.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

0 comments:

Post a Comment