I am using DownloadFileAsync method of WebClient instance.
It is downloading empty/blank files in case of .dll and .exe extensions but for other files like .rar, txt, msi or zip it is working perfectly fine.
Note: I am downloading file under bin>> Debug/Release folders of the current project
Please suggest why the same method is behaving in a strange manner in case of dll and exe files.
Below are the code snippets:-
clientDownload.Proxy = System.Net.WebProxy.GetDefaultProxy();
clientDownload.Proxy.Credentials = CredentialCache.DefaultCredentials;
clientDownload.Credentials = System.Net.CredentialCache.DefaultCredentials;
clientDownload.DownloadFileAsync(new Uri(file.DownloadUrl+ file.FileName), Path.Combine(tempFolderPath, file.FileFullName));