Solved

Windows Error system.io.directorynotfound c#

Posted on 2009-05-07
2
421 Views
Last Modified: 2012-06-27
Hello,

I have a software tha uses serialport via a usb to serialport cable. I need to monito if the cable is disconnected. In a timer a check it with serialport.IsOpen and if case it is closed i open a new form for the com setting. If I save the new settings, the software save them in an xml file and restart the application where the new settings will be read from the xml.

If i manually call the setting page, every thing works fine, but if it's called by the serialport.IsOpen check, so when the cable is disconnected, I get a windows error at the restart and if I close the program it won't start again. Attached the error I get.

Thank you very much for the help.

P.S. I do not get any error in the debug, but only using the compilied file.
error.JPG
0
Comment
Question by:borntofly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Expert Comment

by:iHadi
ID: 24323884
Hi borntofly,

Can you post the stack trace of the error if its a .net exception.

Also can you post the code of the saving and loading of the settings xml file.
0
 

Accepted Solution

by:
borntofly earned 0 total points
ID: 24492448
I solved the problem....

It was a problem with the setup file.

Thank you
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to remove duplicate code from my project 5 66
itextsharp with c# 3 35
Connect Gridview column to Textbox in C# 2 55
async questions 5 49
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question