This is a migrated thread and some comments may be shown as answers.

OpenFileDialog FileNotFoundException

1 Answer 50 Views
FileDialogs
This is a migrated thread and some comments may be shown as answers.
shuai hong
Top achievements
Rank 1
shuai hong asked on 17 Jul 2018, 02:09 AM

Hi Telerik,

my os :win10

VS:2015

telerik :WPF 2017 R1 SP1

when is use the OpenFileDialog control,and click the oepn button,it will throw 19 exceptions, System.IO.FileNotFoundException.

1. read c:\config.msi error.

2. read c:\Documents and Settings error.

......

and so on.

why?

It would be nice if you could help me here.
with kind regards

 

When I use the Openfiledialog control, when I click the Open button, I will cause 19 exceptions, System.IO.FileNotFoundException, the first c:\\config.msi error, the second, the c:\\Documents and settings error, and so on.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 19 Jul 2018, 08:00 AM
Hello Shuai,

Those exceptions are thrown and caught with a try-catch structure, in the code of the dialogs, when they try to get an unaccessible directory. This exceptions will be only printed in the Output pane of Visual Studio and you can safely ignore them. The application will run properly.

If Visual Studio throws the exception on your side you can disable this by changing the exception settings via the Exception Settings pane.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
FileDialogs
Asked by
shuai hong
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or