Error "System.Unauthorized.AccessException: Access to the path "<FilePathLocation>" is denied"

Product(s): FlowMaster, WaterGEMS, SewerGEMS, CivilStorm, StormCAD, PondPack, StormCAD, HAMMER, WaterCAD
Version(s): 08.11.XX.XX and 10.XX.XX.XX
Area: Installation

 

Problem

The following error are being returned.

"System.Unauthorized.AccessException: Access to the path "<FilePathLocation>" is denied"

This has been known to occur when doing one of the following:

  • Computing the model.
  • Closing the software.
  • Creating a pump definition.

---------------------------
UnauthorizedAccessException Details
---------------------------

System.UnauthorizedAccessException: Access to the path '<FilePathLocation>' is denied.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)

Solution

This error appears when the software cannot access or save to the folder location specified.

The following steps may require the assistance of your company's IT department

Solution 1: Set the software to "Run as Administrator"

  1. Close the software.
  2. Navigate to the desktop and locate the shortcut to the program.
  3. Right-click on it and select "Properties".
  4. Click on the Compatibility tab.
  5. In this tab click the check box for "Run this program as an administrator", click "Apply", then "Ok".
  6. Try to open and run the model.

Solution 2: There is an issue with an output file

  1. Browse to the directory that has the model files in it.
  2. Locate the main two model files.
    1. For the latest versions of the storm and sewer products, look for the .STSW and .STSW.SQLITE file.
    2. For the latest versions of the water products, look for .WTG and .WTG.SQLITE.
  3. Copy only these two files, to another folder.
  4. Reopen that copy of the model and try again.

Solution 3: The model files are located on a CD or DVD

  1. Copy the model files to a folder on the machine's local drive that the user has read/write access to.
  2. Open the model from there.

Solution 4: There is an issue with the software installation

  1. Uninstall the software from the computer

  2. Make sure the Bentley folders and their subfolders at the following locations have full administrative privledges and read/write access.                                               
    A) "C:\Users\[UserName]\AppData\Roaming" 
    B)"C:\Users\[UserName]\AppData\Local"                       
    C) "C:\Program Files"  
    D) "C:\Program Files(x86)" 
    E) "C:\Program Data"

  3. Go to the folder locations listed below and delete any folders that may be left for the program you uninstalled in step one:   
    A) "C:\Users\[UserName]\AppData\Roaming\Bentley"                                                                 
    B) "C:\Users\[UserName]\AppData\Local\Bentley"  
    C) "C:\Program Files\Bentley"                                        
    D) "C:\Program Files(x86)\Bentley" 
    E) "C:\Program Data\Bentley"

  4. Download the latest version of the software and the patch set for that version using the instructions below and save the files on your local hard drive.

Downloading OpenFlows / Hydraulics and Hydrology software

Cumulative patch set frequently asked questions

Solution 5: Contact Technical Support

If the above steps do not resolve the issue, then please contact technical support for futher help.   

Recommended
Related