Greetings all!

I'm relatively new to VB.NET and i was wondering if someone would be
able to help me with a problem that I'm seeing with a service and
application I've created:

The service has two functions: first, on startup, it PROCESS.STARTs
my  application (which starts minimized to the system tray as a
notification icon). Second, it watches my app, and restarts it in case
of accidental closing or in the event of a crash.

This process works fine, except for the intial startup at login.  At
login I always receive the following error:

EventType : clr20r3     P1 : iam.exe     P2 : 3.0.0.0     P3 :
48f4e74d
P4 : mscorlib     P5 : 2.0.0.0     P6 : 471ebc5b     P7 : 3404
P8 : 15a
P9 : system.unauthorizedaccess

After I click OK, the service restarts the application and everything
runs smoothly (until the next logon event).

At first, I was wondering if this was being caused by the application
launching before the desktop and system tray had initialized, but that
really doesnt seem to jive with unauthorizedaccess error, so I can
only assume that the issue is that the app is starting before the user
is fully authenticated (the app writes to a log file on a network
share).  Even, that doesnt seem right to me, though, as the error pops
after the login script has processed and the user has mapped their
network drives.

I know I could probably put a sleep event in there, but that's really
clunky.  I've thought about putting a new key in HKLM\Software\Micrsoft
\Windows\CurrentVersion\Run to net start the service, but again,
that's far from elegant.

So, does anyone have any thoughts at how I should proceed to
troubleshoot this or a way to get more information about what's really
happening?

Reply via email to