CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006
    Posts
    216

    "The system cannot find the file specified"

    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.

  2. #2
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: "The system cannot find the file specified"

    Quote Originally Posted by visharad
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured