I'm trying to send file asynchronously using sftp client BeginUploadFile.
Either using stream or string path.
See 1.png and 2.png to see the IAsynResult of the callback function.
I'm using it with dotnet 3.5
```
private void SendXmlFile(XDocument xDocument)
{
var fileName = GenerateFileName();
using (var client = new SftpClient("127.0.0.1", 990, "user01", "us3r01"))
{
client.Connect();
var stream = CreateStream(xDocument);
client.BeginUploadFile(stream, fileName, UploadCompleted);
client.Disconnect();
}
}
```
Comments: ** Comment from web user: drieseng **
Either using stream or string path.
See 1.png and 2.png to see the IAsynResult of the callback function.
I'm using it with dotnet 3.5
```
private void SendXmlFile(XDocument xDocument)
{
var fileName = GenerateFileName();
using (var client = new SftpClient("127.0.0.1", 990, "user01", "us3r01"))
{
client.Connect();
var stream = CreateStream(xDocument);
client.BeginUploadFile(stream, fileName, UploadCompleted);
client.Disconnect();
}
}
```
Comments: ** Comment from web user: drieseng **
Works fine here.
Please provide a full code example that shows the issue.