Options

Access to the path ... is denied

gtrgtr Member Posts: 131
Hello

I work on a program tu download FTP files to the server (using dotnet)
I use this instruction : SIOFile.WriteAllBytes(filename, MemoryStream.GetBuffer());
Which gives me the error message :
"A call to the System.IO.File.WriteAllBytes failed with the message :
Access to the path ... is denied"

The path is on F:\...\...\... and as a user I can create, read & delete Files in this folder
Even if I run NAV as Admin I get the error
The security on the folder is set to Total control for my user
In my program I successfully used dotnet to upload files
In my program I also successfully create copy and delete files (with nav instructions)

Can you please help me to find other hints to get this work ?
Thanks

Answers

  • Options
    parmparm Member Posts: 49
    Hi,
    I suggest to check these cases:
    1) Your code is running in the server or in the client? The F:\...\...\ folder may exists in one place but not in the other. You can test this with a simple modification. Change the folder to C:\TempNav\ and create this folder on client and server.
    2) This could be a delegation issue. Try to check what login is creation the file.

    Regards,

    parm
  • Options
    gtrgtr Member Posts: 131
    Thanks - My fault - My folder string was not correct
Sign In or Register to comment.