Click to See Complete Forum and Search --> : "The system cannot find the file specified"


visharad
February 14th, 2008, 03:37 AM
I am using VS 2005 and .Net 2.0
I wrote an application in C# in which I want to launch a local .htm file in default browser. The code is: -
System.Diagnostics.Process.Start(name with full path of the .htm file);

In some systems, I get the error "The system cannot find the file specified".
But after that the file is launched in browser and everything works file. But why does this error come?
Let me know how to solve this problem. Thanks.

nelo
February 14th, 2008, 03:46 AM
I am using VS 2005 and .Net 2.0
In some systems, I get the error "The system cannot find the file specified".
But after that the file is launched in browser and everything works file. But why does this error come?

I assume that your application has been deployed and that you don't get the error in your development machine. I think the framework can actually give you more detail about which file its looking for. If you had the problem in your development environment you would be able to look at the exception detail. If you only see the problem in client environment I suggest you add some code to write the error to the event log or some other logging mechanism.