471,310 Members | 1,432 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

mshtml & web browser from dotnet service

NG
Hi All
This is a post further to my previous problem that I solved with the help of
my friends at csharp group.

I have a UI application that has a web-browser. When this application is
run with the URL as one of the command parameters, this application accesses
the web page in its web browser and parses the data of this web-site to get
the specific information this app is interested in. This application works
perfectly when run from a command prompt or a batch file. (I know I don't
have to use web browser control and mshtml is enough for most purposes.
But, in my case IT IS required.)

However, now I needed to invoke the same application from csharp windows
service. I made the service property to be able to interact with desktop.
The service perfectly opens the application and I can see the application
running on my desktop.

System.Diagnostics.Process p=new System.Diagnostics.Process();
p.StartInfo.FileName="notepad.exe"; // my app is run instead
bool x=p.Start();

Now the problem is the web-browser is not able to open the web page that I
am looking for. It always returns the error page saying:

Internet Explorer was unable to link to the web page you requested. The
page might be temporarily unavailable.......

I found on the net that this error occurs when the site has been requested
and then the request is cancelled immediately.

I am not sure but this has something to do with windows service security?
Is the service making the download to stop/cancel the web-request?

Can anyone please throw some light on the cause of the problem.

Any help is much appreciated.

Thanks & regards,
Nitesh
Dec 2 '05 #1
2 1819
"NG" <xgniteshATyahooDOTcom> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl
However, now I needed to invoke the same application from csharp
windows service.


A service running under Local System account (the default) does not have
any networking capabilities, for security reasons. Create a dedicated
user account for it, configure it to run under that account.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
Dec 2 '05 #2
NG
Thanks for your help Igor.
My program works perfectly when I run from a different user account.
Best Regards,
Nitesh Gupta
Dec 5 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Zürcher See | last post: by
10 posts views Thread by Sunny | last post: by
1 post views Thread by Dean Hallman | last post: by
12 posts views Thread by Brian Henry | last post: by
7 posts views Thread by Mike Livenspargar | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.