mshtml & web browser from dotnet service

N

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
 
I

Igor Tandetnik

NG said:
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
 
N

NG

Thanks for your help Igor.
My program works perfectly when I run from a different user account.
Best Regards,
Nitesh Gupta
 

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,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top