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
 

jwh

Well-known member
Joined
Aug 18, 2006
Messages
155
Programming Experience
3-5
XP embedded runs the full framework, including v3.5 without issue.
 

MattP

Well-known member
Joined
Feb 29, 2008
Messages
1,206
Location
WY, USA
Programming Experience
5-10
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.
 
Top Bottom