❔ How to resolve System.UnauthorizedAccessException when a serial port is open but already in use
Hi there, I'm sorry for this newbie request but I looked for any solution on SO with no avail.
I have a simple .NET 4.5 software that use a Serial port to connect with a device. In the first form there a combobox with all serial port but even if I checked in advance if the portName is open, if the port is already in use the software there will be an infinite loop of Error in Serial Configuration due to System.UnauthorizedAccessException.
Do you have any suggestions? Thanks in advance.
I have a simple .NET 4.5 software that use a Serial port to connect with a device. In the first form there a combobox with all serial port but even if I checked in advance if the portName is open, if the port is already in use the software there will be an infinite loop of Error in Serial Configuration due to System.UnauthorizedAccessException.
Do you have any suggestions? Thanks in advance.