2013-06-25 35 views
0

我已经在应用程序端口上发送了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中。

回答

0

我们最近添加了a new logging module,它可以让您实时访问您的后台工作人员的STDOUT和STDERR。

您可以通过单击应用程序导航栏中的“日志记录”链接开始日志会话。这应该会给你更多的输出来帮助识别和解决这个问题。

0

我刚刚在应用程序属性窗口中更改了应用程序的启动对象[以前未设置],并重建并将其托管在应用程序端口上,我的应用程序开始工作f9。

相关问题