Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: sftpClient.UploadFile(fileStream, fileInfo.get_Name(), null); FAILED

$
0
0
Hi,

I have successfully made the connection to SFTP server using SFtpClient class.

I am trying to upload a file using SFtpClient.upload() using below syntax,
sftpClient.UploadFile(fileStream, fileInfo.get_Name(), null);

Where fileStream is the object of System.IO.FileStream() and fileInfo is the object of System.IO.FileInfo()

but i am getting below error while executing this syntax.

System.Reflection.AmbiguousMatchException: Ambiguous match found.

at System.RuntimeType.GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers)

at System.Type.GetMethod(String name)

at Microsoft.Dynamics.AX.ManagedInterop.ClrBridgeImpl.GetMethodInfo(ClrBridgeImpl* , Type pType, Char* pszMethodName, Type[] argumentTypes)

at Microsoft.Dynamics.AX.ManagedInterop.ClrBridgeImpl.InvokeClrInstanceMethod(ClrBridgeImpl* , ObjectWrapper* objectWrapper, Char* pszMethodName, Int32 argsLength, ObjectWrapper** arguments, Boolean* argsAreByRef, Boolean* isException)![Image]

many thanks in advance.

kind regards,

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>