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
Solved

Windows Error system.io.directorynotfound c#

Posted on 2009-05-07
2
419 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
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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
Hey!!!! 1 25
Changes to XXX.exe.config file are not retrieved on restart. 3 39
LINQ Select all records by MAX data syntax help 1 17
Input parameteres to DragOver 2 19
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 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