突然出现以下错误!它在服务器上部署应用程序后工作了几个月但突然停止工作并显示以下错误。
我使用的代码如下:
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);
}

请帮忙!这是一个实时应用程序:(
提前致谢。
答案 0 :(得分:0)
我将在黑暗中拍摄并说你的服务器上已经设置了一个系统范围的代理,并且由于void completOrder(Order order) { ... }
//or
void parserTokenEnded(String str) { ... }
实例默认使用它,现在它已经失败了。
后:
WebClient
添加:
var myWebClient = new System.Net.WebClient();
重新编译/重新启动应用程序,让我知道我的巫毒调试感觉是正确还是完全BS。