The only thing I can think of is that it's a dependancy issue.  Try
delaying the startup of the service until windows is completely
booted.

good luck

On Jun 18, 8:08 am, James Lamanna <[email protected]> wrote:
> Hi,
> I have a service written in C# that interacts with the serial port.
> On the startup of the computer, the service cannot open the serial
> port. .Open() returns with an UnauthorizedAccessException.
> However, if I restart the service once I log in, everything is fine.
> Can someone explain why this might be the case? This seems to only be
> a property of the SerialPort object.
> I believe using CreateFile() through p/Invoke works...
>
> Thanks.

Reply via email to