Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2008 Jun : InternetGetConnectedState when running app as Local System (servic
| Subject: | InternetGetConnectedState when running app as Local System (servic |
| Posted by: | "EGON" (eg..@discussions.microsoft.com) |
| Date: | Wed, 18 Jun 2008 01:52:02 |
Hi!
I placed this Q in another area in Newgroup, but I think this place is more
right ...
...
We have a C# .NET application (exe) that is started by a service (like a
watchdog) and the application is thereby runing as Local System account.
On cetain computers (only a very few of thousands) it seems like the call
InternetGetConnectedState gets FALSE back (even when there is a connection)
and when i check GetLastError it says 5=Access denied, that
InternetGetConnectedState got Access denied and thereby returns false (I
assume).
Summery:
-So it seems like the app gets Access denied when it tries to call
InternetGetConnectedState when app runs as Local System account.
-If we run application as User (not Local system account / service) then
application works.
-If we remove the call to InternetGetConnectedState and just let the app go
on,
everything else works fine in the application, like communication towards
internet. (But we need the check, of course.)
The problem seem to appeared the latest weeks, but we're not sure.
Any ideas?
Regards
/Marcus