我已經在應用程序端口上發送了1個後臺工作人員用於發送電子郵件。從過去的3到4天它不工作,我得到錯誤「終止與退出代碼-2147467259」。Appharbor後臺工作者問題 - 錯誤:「終止退出代碼-2147467259」
靜態無效的主要(字符串[]參數)
{
while (true)
{
//Worker_Process_For Send Email
EmailCls.SendEmail_ByMailGun("[email protected]", "[email protected]", "Testing Shailesh-live", "body-live");
}
}
公共靜態IRestResponse SendEmail_MailGun(串從,字符串,字符串主題:
下面是在背景工人使用腳本,string body)
{
RestClient client = new RestClient();
client.BaseUrl = ConfigurationManager.AppSettings["mailgun_baseurl"].ToString();// "https//api.mailgun.net/v2";
client.Authenticator = new HttpBasicAuthenticator("api", ConfigurationManager.AppSettings["mailgun_key"].ToString());
var mailgun_domain = ConfigurationManager.AppSettings["mailgun_domain"].ToString();
RestRequest request = new RestRequest();
request.AddParameter(mailgun_domain,mailgun_domain, ParameterType.UrlSegment);
request.Resource = "{" + mailgun_domain + "}/messages";
request.AddParameter("from", from);
request.AddParameter("to", to);
request.AddParameter("subject", subject);
request.AddParameter("html", body);
request.Method = Method.POST;
return client.Execute(request);
}
給定腳本工作鰭e在本地機器上,而不是從appharbor中。