No application is associated with the specified file exception
Posted
by baron
on Stack Overflow
See other posts from Stack Overflow
or by baron
Published on 2010-04-14T00:51:49Z
Indexed on
2010/04/14
0:53 UTC
Read the original article
Hit count: 804
UnhandledException: System.ComponentModel.Win32Exception: No application is associated with the specified file for this operation
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(String fileName)
Hi everyone,
I am getting the following exception on one machine I am testing on when trying to use Process.Start to open a .csv file. I think this is happening because no file association has been set for .csv files on this box.
So how would you avoid this situation?
Force the Process.Start to open in Notepad? - Ideally it should be opened in excel, but what do you do if excel then doesn't exist on that computer?
Thanks
© Stack Overflow or respective owner