NetworkFileSystem.File_Delete => Access to the path X is denied

NetworkFileSystem.File_Delete => Access to the path X is denied

When i try to delete a file using


i get:

"Access to the path 'c:\test\test.txt' is denied., Win32Error: 5
System.UnauthorizedAccessException: Access to the path 'c:\test\test.txt' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.Delete(String path)
at OutSystems.NssNetworkFileSystem.CssNetworkFileSystem.MssFile_Delete(String ssPath, String ssDomain, String ssUsername, String ssPassword, String& ssError_message)"

File does exist, and the permision of the user or set correct, any ideas? Other actions like File_Copy do work.

Kind regards,


Hi Matthias


File system management from an OutSystems application requires very particular filesystem privileges to run properly. If the espace that's using the NetworkFile_System extension is running under the default security identify (ISUR_<MACHINENAME> in Windows 2003, ASPNET in Windows XP or ApplicationPoolIdentify type in Windows Vista, 2008 and 7), then the folder you want to change or delete must have Read, Read & Execute, Write, Modify and List Folder Contents privileges for the ASPNET account (Windows XP), or IIS_WPG local group (on Windows 2003) or IIS_IUSRS group (Windows Vista,2008 and 7).


If you have a Run As user set in the espace operation/runtime configurations, then you need to grant the user the same privileges to the folder resource described above.


If these permissions are set, then you might be getting this exception due to other reasons. Since it's clearly a file system access denied, I suggest the usage of the ProcessMon tool from Microsoft, as described on the topic How to: Identify which file is getting locked or is not accessible, to identify the process, the user and the file that's actually being accessed and generating the ACCESS DENIED result.


Hope this helps troubleshooting that exception.


Keep us posted




Miguel Simões João

I found a sollution for it:
- changed/improved the user impersonation.
- use shares to access the path.

I'll post an updated version of the Network_filesystem extension.

Kind regards,
Matthias Preuter

Hi Matthias


That's good to know!




Miguel Simões João

Hi Matthias,

I am getting the same error. Could you please explain how did you resolve this error.

I am using Outsystems and trying to read a file from server's "C:\test".

I think i used the "Network FIleSystem" extension, with a user that has the proper rights to delete the file.
Thanks for reply...

so do you suggest me to use this extension to read/write file from server...!