Thanks a lot Martin for your help,
The solution you gave me is working. I simply forgot to disable preserving the timestamp.
For the permissions I firstly try by not setting them but the system was still giving me the exception.
By doing both, it's now working perfectly fine.
Thanks a lot again
RT
                
            
        
    
    
        
        
            
            
                Ok I will try that. I come back to you if it works.
                
            
        
    
    
        
        
            
            
                Here is the display I get when it throw an exception (Message and toString of the exception).
Sorry It is in french. Do you want me to translate it ?
Cordialy,
Rémi
                
            
        
    
    
        
        
            
            
                What's the exception exactly?
                
            
        
    
    
        
        
            
            
                Hi everyone !
I would like to know how to disable the FilePermission Exceptions everytime I'm transfering a file using vb.net
I can transfer the file fine but it throw the permission error when I check. And I would like the check to not throw this error especialy.
I'm using winscp Beta. (last one)
The code where i encounter the problem :
<Creation of the session...>
<Connexion OK...>
            Dim transferOptions As New TransferOptions
            transferOptions.TransferMode = TransferMode.Binary
            transferOptions.FilePermissions = New FilePermissions(300)
            Dim transferResult As TransferOperationResult
            Dim nomfichier As String = System.IO.Path.GetFileName(a_FileName)
            transferResult = sessions.PutFiles(<MyFile>, <PathOnServer>, False, transferOptions)
            transferResult.Check()
            sessions.Close()
            Return True
        Catch e As Exception
            MsgBox("error sftp : " & e.Message & vbCrLf)