You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a problem with the webdav.client I'm using in my .Net Core project.
I'm having trouble loading the webdav file after the rest of my project is done. But this problem is not always the same. In some cases, it doesn't.
Webdav restart while uploading file
My webdav upload code is written asynchronously.
I'm having problems installing webdav similar to the scenarios below;
→ When I send multiple Postman requests to upload several large files (400mb - 10gb)
→ In some cases, the asynchronous webdav upload process does not finish for large or small files, and the upload does not take place (for only one request).
Can asynchronous operation logic cause problems with parallel loading requests?
Can asynchronous operation logic cause problems with parallel loading of large files?
Some code example;
`
ResultDto<List<string>> webdavResult = new ResultDto<List<string>>() { IsSuccess = false, Message = "An error accured in webdav request" };
try
{
if (string.IsNullOrEmpty(m_WebdavAdress))
m_WebdavAdress = ConfigReader.Instance.GetWebdavAddress();
Log.Information($"Webdav Adress: {m_WebdavAdress}");
var baseAddress = string.Format("{0}/{1}", m_WebdavAdress, "path/");
var timeout = TimeSpan.FromDays(7);
var clientParams = new WebDavClientParams { BaseAddress = new Uri(baseAddress), Timeout = timeout };
Log.Information($"Webdav Base Adress: {baseAddress}");
WebDavResponse response;
using (var client = new WebDavClient(clientParams))
{
FileStream file = File.OpenRead(filePath);
var task = Task.Run(async () => await client.PutFile(filename + ".mkv", file)).ConfigureAwait(false);
//var task = Task.Run(() => client.PutFile(filename + ".mkv", file));
Log.Information($"Filename: {filename}");
response = task.GetAwaiter().GetResult();
Log.Information($"WebdavUploadAsync result {response?.IsSuccessful}");
}
List<string> exportWebdavurl = new List<string>() { string.Format("{0}/{1}/{2}", m_WebdavAdress, "path/", filename + ".mkv") };
webdavResult = new ResultDto<List<string>>()
{
IsSuccess = response.IsSuccessful,
Message = response.Description,
Data = exportWebdavurl
};
}
catch (Exception e)
{
Log.Error("Webdav upload error : " + e.Message);
webdavResult = new ResultDto<List<string>>()
{
IsSuccess = false,
Message = e.Message,
Data = null
};
}
return webdavResult;
}
`
The text was updated successfully, but these errors were encountered:
arfgndgd
changed the title
Webdav upload error (async upload, largest file, parallel request)
Webdav restart while uploading file. Webdav upload error (async upload, largest file, parallel request)
Nov 1, 2022
Hello,
I'm having a problem with the webdav.client I'm using in my .Net Core project.
I'm having trouble loading the webdav file after the rest of my project is done. But this problem is not always the same. In some cases, it doesn't.
Webdav restart while uploading file
My webdav upload code is written asynchronously.
I'm having problems installing webdav similar to the scenarios below;
→ When I send multiple Postman requests to upload several large files (400mb - 10gb)
→ In some cases, the asynchronous webdav upload process does not finish for large or small files, and the upload does not take place (for only one request).
Can asynchronous operation logic cause problems with parallel loading requests?
Can asynchronous operation logic cause problems with parallel loading of large files?
Some code example;
`
`
The text was updated successfully, but these errors were encountered: