Hi,

I am using the rebex.net.sftp to connect. I am trying to use a log file to debug some issues.

Here is my code for the logwriter property.

Dim sftpClient As New Rebex.Net.Sftp() sftpClient.LogWriter = New Rebex.FileLogWriter("e:temp", Rebex.LogLevel.Debug) sftpClient.Connect(Domain, PortNumber) sftpClient.Login(Username, Password) sftpClient.GetFile(URL, LocalPath)

I am getting System.UnauthorizedAccessException to path "e:temp". I have verified that all the permissions are right. Infact my application writes different temp file to this directory using the same account. So, I am lost at this point. Any help is appreciated.

Thank you

asked 09 Sep '11, 17:33

ARV's gravatar image

ARV
15
accept rate: 0%

1

Please try calling System.IO.File.WriteAllText("f:temp", "test"); - does it cause the same exception?

(09 Sep '11, 17:57) Lukas Pokorny ♦♦
1

Also, what are you trying to achieve? Where would you like the log file to be placed? In a file inside the "temp" folder of the "e:" drive, or somewhere else?

(09 Sep '11, 17:59) Lukas Pokorny ♦♦

Yes, the .net class gave me the same exception. Apparently it is using the local system account for logging. After giving that account permissions to the folder, the logging is fine. Thank you very much for your response.

link

answered 09 Sep '11, 18:08

ARV's gravatar image

ARV
15
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×141

Asked: 09 Sep '11, 17:33

Seen: 345 times

Last updated: 09 Sep '11, 18:08