Bharathi Raja

Bharathi Raja

  • NA
  • 1.1k
  • 54.9k

500 internal server error at GetResponse()

Jan 6 2018 2:28 AM
this line to error
 
  1. try  
  2.            {  
  3.                file = @"" + drives[drive_i] + "fsmanager_good_" + fileto + ".csv";  
  4.                string json_off = new WebClient().DownloadString(file);  
  5.                byte[] bytes = Encoding.Default.GetBytes(json_off);  
  6.                json_off = Encoding.UTF8.GetString(bytes);  
  7.                //json_off = Uri.EscapeDataString(json_off);  
  8.                json_off = json_off.Replace("Cash & Card""CashandCard");  
  9.                //MessageBox.Show(upurl + "fileupload.php?ontbl=" + Uri.EscapeUriString(json_off));  
  10.                string json_on = new WebClient().DownloadString(upurl + "fileupload.php?ontbl=" + Uri.EscapeUriString(json_off));  
  11.                if (File.Exists(file))  
  12.                {  
  13.                    File.Delete(file);  
  14.                }  
  15.                err = 1;  
  16.            }  
  17.            catch  
  18.            {  
  19.               // MessageBox.Show("Please connect internet.", "Online Alert", MessageBoxButtons.OK, MessageBoxIcon.Information);  
  20.            }  

Answers (7)