Need Your Help. When i downloaded myself it opening but when i downloading with c# windows form it Downloading Successfully but not opening, am using this code to download Rar or Zip File.
private void downloadBtn_Click(object sender, EventArgs e)
{
WebClient client = new WebClient();
string tAddress = "Download Link"; // When i Downloaded mySelf it Worked And Opened
string fileName = "Testfile.Zip";
Uri uri = new Uri(tAddress);
client.DownloadFileCompleted += Client_DownloadFileCompleted;
client.DownloadFileAsync(uri, fileName);
}
private void Client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
{
MessageBox.Show("Download Completed Successfully!");
}
This is Error When I Trying To Open Rar Or Zip File. It Says Error, This File Has Incorrect Format Or Damaged, But When I Try To Download Myself Its Opened