views:

347

answers:

1

I have a simple Tray icon program that opens a site using

System.Diagnostics.Process.Start("URL")

And it works fine independently, however when a service loads it, it gives a file not found exception when trying to open the url, and after testing it can open normal extensions eg .txt (The service has desktop interaction enabled)

+3  A: 

If you Process.Start a URL, it is loading a browser app, which isn't (for Vista/etc) going to display for a service (for the same reasons as your last question).

If you want the app to interact with the user/desktop, it shouldn't be a service - it should simply run when the user logs in. Note that any child-process that your service spawns will also be in the service's session.

If you just want to get data (through code) from the site, use WebClient etc.

Marc Gravell