File Not Found error when file actually exists

burwelj

Member
Joined
Dec 11, 2007
Messages
5
Programming Experience
1-3
Hello,

I have an application that renders a report from reporting services in pdf format, then opens that file to print automatically.

this works fine on my local machine and all machines it has been installed on, except one.
The PC this does not work on is running Windows Embedded. I'm not sure if that has anything to do with it or not.

Below is the code that is catching this error.

Any and all suggestions are greatly appreciated. Let me know if there is any other information I can provide.

thank you.

VB.NET:
Catch ex As System.ComponentModel.Win32Exception

            Select Case ex.NativeErrorCode
               Case 2 : Throw New System.IO.FileNotFoundException
               Case Else : Throw New Exception(ex.Message & " (PrintAdobePDF)")
            End Select
 
XP embedded runs the full framework, including v3.5 without issue.
 
Native error code 2 is file not found.

I'm pretty sure that embedded has a problem with the concept of relative paths. Try specifying the path in full.
 
Back
Top