c# - Threading as a WCF Service -


I need to run to send an email to a Windows service that I installed on a machine and still log long enough a and then sleep for 24 hours if I call service method from a web client, it works fine, but when I say that the windows service, it remains each time failed, and error information to check me anything Not specific to:

Communications object, System.ServiceModel.Channels.Servic EChannel can not be used for communication, because it is in error state

  public partial class EDBDailyLogMailer:. ServiceBase {thread thread; Public EDBDailyLogMailer () {InitializeComponent (); This.ServiceName = "EDB Daily Log Mailer"; } Safe Override Zero Start (string [] args) {try {thread = new thread (MailLogDaily); Thread.Start (); } Hold (Exceptional) {East; }} Static void MailLogDaily () {while (true) {) client.EmailEventLog (try using {(ApprovableFieldClient client = new ApprovableFieldClient ()); Thread.Sleep (86400000); } Hold (Exceptional) {East; }}}}  

The code works fine in emailEventLog () when calls from other places, so I will not post that code. Here's my endpoint in App.config:

   & Lt; / NetTcpBinding & gt; & Lt; / Binding & gt; & Lt; Customers & gt; & Lt; endpoint bindingConfiguration = "ExperienceServiceBinding" address = "net.tcp: // bosvc01: 1125 / ApprovableFieldService" binding = "netTcpBinding" contract = "Ropes.Experience.Administration.Contracts.Services.IApprovableFieldService" & gt; & Lt; Identity & gt; & Lt; ServicePrincipalName value = "firstname.lastname@somecompany.com" /> & Lt; / Identification & gt; & Lt; / Endpoint & gt; & Lt; / Customer & gt; & Lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior name = "Rop. Experience. Administration. Manager. Approblfild Manager" and "gt; & Lt; service Dibg include ExceptionDetailInFaults =" true "/ & gt; & Lt; / Behavior & gt; & Lt; / serviceBehaviors &  

Organizing bosvc01 on ApprovableFieldClient service: 1125

No suggestions would be greatly appreciated. Thank you.

solution. I deleted all my effort / catch the error message Given more detail information in


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -