The following error started coming up suddenly! It worked for months after the application was deployed on the server but suddenly it has stopped working and showing the following error.
The code I am using as follows:
private void PostData()
{
c.Add("publicid", "xxxxxxxxxxxxxxxxxxxxxx");
c.Add("name", "ABC");
c.Add("label:Affiliate_ID", "207");
c.Add("website", "websitename.com");
c.Add("label:IP_Address", Request.ServerVariables["REMOTE_ADDR"]);
c.Add("firstname", txtFirstName.Text.Trim());
c.Add("phone", txtPhone.Text.Trim());
c.Add("lastname", txtLastName.Text.Trim());
c.Add("email", txtEmail.Text.Trim());
c.Add("label:Date_of_Birth", String.Format("{0:YYYY-MM-DD}", Convert.ToDateTime(txtDob.Text.Trim())));
c.Add("lane", txtStreetAddress.Text.Trim());
c.Add("code", txtZip.Text.Trim());
c.Add("city", txtCity.Text.Trim());
c.Add("Province", txtProvince.Text.Trim());
c.Add("label:Time_At_Address", stay.ToString(CultureInfo.InvariantCulture));
c.Add("label:Known_Credit_Issues", "yes");
c.Add("label:Net_Monthly_Income", txtMothlyIncome.Text.Trim());
c.Add("label:Occupation", txtOccopation.Text.Trim());
c.Add("label:Employer_Name", txtEmployer.Text.Trim());
c.Add("label:Employment_Length", "");
c.Add("label:Bankruptcy", "No");
c.Add("label:Employer_Phone_Number", "");
c.Add("label:Employer_Postal_Code", "");
c.Add("label:Employer_Province", "");
c.Add("label:Employer_City", "");
c.Add("label:Employer_Address", "");
var myWebClient = new System.Net.WebClient();
const string postingUrl = "https://xxxx.com/modules/Webforms/capture.php";
byte[] responseArray = null;
responseArray = myWebClient.UploadValues(postingUrl, "POST", c);
var responseData = Encoding.ASCII.GetString(responseArray);
}
Please help! It is a live application :(
Thanks in advance.