views:

1094

answers:

1

I am using VB.NET 2008 Express Edition to access Serial Port which is a USB to Serial port. Since this is removable, the app user can disconnect it at any time in app. I am getting an unhandled exception when I remove the USB Serial Port.

After research, it seems like a known problem in .NET (even in 3.5)

I am looking for some solution to get this done. I have already tried the app.config solution that was suggested and it does not work

Here is the link for issue http://connect.microsoft.com/VisualStudio/feedback/Validation.aspx?FeedbackID=140018

A: 

There were a number of serial port libraries written for .Net 1.1, since it did not provide built-in classes for ports. Here is one example; there are others, open source and commercial.

You do not have to use the framework; if you use something like this, you will have access to the code right down to Win32. You might stand a better chance of catching the exception that way.

R Ubben
Thanks for your reply, I will take a look at itThx