Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 1167
Product
XFile
Version
Version 2 through 2.2.3
Title
XFile returns download error message, "The system cannot find the file specified."
Problem

The error may be returned as a pop-up or as a run-time error, depending on how your code is configured:

XFile returns the following pop-up* error message:

AXFFileDownload Error
Error: Source = SoftArtisans.XFFile.1
Description = The system cannot find the file specified.

The following run-time** error message is thrown:

Error
A Runtime error has occurred.
Do you wish to Debug?
Line: [line#]
Error: Error: Source= SoftArtisans.XFFile.1
Description = The system cannot find the file specified.


* Error will not be raised if SuppressPopupTransferError is set to true. See KB article 1082: How do I suppress pop-up error messages with XFile's visual controls?

**Error will not be raised if "On Error Resume Next" is used in your code.

XFile will return an error message "The system cannot find the file specified" for multiple reasons. In order to diagnose the root cause of the error message, you may need to look for more detailed error messages, such as in the DownloadError object or in the the XFile debug log. The following article lists some of the more common problems that will cause this error to be raised. Additional debugging information is provided so that you can match the error messages with the behavior. This may help you design custom, specific user-friendly error messages or even a strategy to handle the situation without user intervention.

Solution
Either one or both of the above error messages will be returned by XFile in different situations:

  • An incorrect URL is provided for file that you wish to download.
    You can verify this by checking the following:
    • The last line of the XFile debug log will read, "Error Getting File: Exception Occurred."
    • The AllDownloadsSuccessful property will incorrectly return "true".
    • The Number property of the DownloadError object will incorrectly report and error code, 0.

  • The folder to which the file should be saved on the client has inadequate permissions.
    You can verify this by checking the following:
    • The last line of the XFile debug log will read, "Error Occured: Exception Occurred."
    • AllDownloadsSuccessful property will return "false".
    • The Number property of the DownloadError object will return -2147352567.
    • The Description property of the DownloadError object will return, "Cannot create file".

  • XFile cannot create the needed directory on the client.
    This is because either the drive letter specified does not exist on the client or because there are inadequate permissions on the parent directory for the subdirectory that XFile is trying to create. You can verify this by checking the following:
    • The last line of the XFile debug log will read, "Error Occured: Exception Occurred."
    • AllDownloadsSuccessful property will return "false".
    • The Number property of the DownloadError object will return -2147352567.
    • The Description property of the DownloadError object will return, "Create Download File: Could not create save directory".

    Under normal circumstance (correct permissions, correct drive letter), if a folder does not exist, XFile will create that folder on the client and the download will be successful.


Related Links:
Created : 8/8/2005 3:20:45 PM (last modified : 8/8/2005 3:20:45 PM)
Rate this article!
Comments