• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 783
  • Last Modified:

Access to COM port is denied

I am trying to test out some functionality when I try and write to a cOM port and I keep getting access to port is denied. I originally open my com port and set it up however Im testing out to see if the device becomes unplugged (which I do do) I get an Access to the port is denied error
COM-Error.png
0
cmdolcet
Asked:
cmdolcet
  • 4
  • 3
1 Solution
 
Bob LearnedCommented:
The obvious first question is, "Is something else using the COM port?"  What type of application are you working with?  Is this running from a network share or other partially trusted environment?
0
 
cmdolcetAuthor Commented:
No nothing should be taking it up. I have attached a screen shot of the serialPort properties. This error only happens when I try to write to the device
COM-Port-Access-Denied.png
0
 
Bob LearnedCommented:
Have you had this working before?  Is this new development work?  I see that the port name is COM30...is that correct?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
cmdolcetAuthor Commented:
I have not had this working before. You are correct the device is opening COM 30 which is ok with my program
0
 
Bob LearnedCommented:
1) What operating system are you working with?  

2) Are you having UAC issues with Vista/Windows 7?  

3) Is this application running from a network share?
0
 
cmdolcetAuthor Commented:
OK I figured it out. I was keeping a reference to the serial com and not closing it correctly. I am all set now

Thanks for all the help
0
 
Bob LearnedCommented:
Well, that answered the "Is something else using the COM port?" question...
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now