IOException: Cannot Access the File

Problem

You receive an error message stating "An error has occurred, IOException: The process cannot access the file '\\SERVER\Some Path\XrevTransmit.sdf' because it is being used by another process".

Solution

Xrev Transmit utilises a SQL Compact database (in the form of an SDF file).  One big advantage to using this type of database is that there is no SQL Server to manage.  However, only one user can read/write to the database at a time.  Typically this won't be an issue because when the Xrev Transmit software talks to the database it only accesses it for milliseconds.  So the chance of two users accessing the database at exactly the same time is rare.  There is also built in logic, so if two clients access the database at exactly the same time, the second one should retry a few times before giving this error message is shown.  However, there are cases where this error message is more likely, such as when operating over a slow network such as a WAN or VPN.  In these cases you simply need to try again.  If you still experience issues, please contact support@xrev.com.au and send us your log files.

If all users are receiving this same message, then its likely that a machine, or Revit has crashed whilst doing a Print/Export task from Xrev Transmit.  When a user accessing any file on a file server, there is a windows file lock created on that file, to prevent multiple users from editing the same file at the same time.  If the program is interrupted during the process of accessing the database then this file lock is not relinquished and then no users can access the database until this file lock is cleared.

To clear a file lock, you will need to either be on the File Server or remote access computer management.

  1. In Windows, search for "Computer Management" and open the console (either on your machine or preferably on the File server),

    1. If doing remotely, Right Click on Computer Management (Local)
    2. Select "Connect to Another Computer"
    3. Enter the Name or IP Address of the File Server or Browse... to select the File Server
    4. Login as an Administrator
  2. Browse to System Tools→Shared Folders→Open Files
  3. Find XrevTransmit.sdf (or whatever you have named your SDF file for Xrev Transmit) and see what user currently has it open.  

    NOTE

    Double check to make sure that user isn't legitimately using the software...

    Once confirmed, Right Click on the file and choose "Close Open File"

  4. All users should now be able to access the database again.

Related articles