WinApp C# - BackgroundWorker : Not initilizing on being initiated on machine

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    WinApp C# - BackgroundWorker : Not initilizing on being initiated on machine

    Hi,
    I have a class which consits of a few background workers

    One of it being the main one, and then calls the others from it,

    I use it to create and send emails, printouts, of reports.
    It works perfectly on a machine which has visua studio installed (in publish mode being done by click once). However on any other client machine, the worker thread isint called. I was testing this by puitting in message boxxes and databse logging in it.

    Would there be any sort of control that needs to be changed?

    Thankyou
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    Removed all references of background worker and converted then to delegates (asynchronus methid invocation) and yet the methods are invocated only on machines which have visual studio installed.

    Ran the application on a machine which did not invocate the methods, and then installed visual studio, and it ran perfectly.

    However I dont know if i would be able to reproduce the same behaviour.

    Comment

    • Shashi Sadasivan
      Recognized Expert Top Contributor
      • Aug 2007
      • 1435

      #3
      This is turning out to be stranger.

      I dumped the idea of using delegates, and called the methods directly (instead of calling them asynchronusly) and yet it only works on the development machines.

      I am not sure why this can happen, and cannot reproduce this.
      The class is structured in the following manner:

      [CODE=cpp]class Trasmit
      {
      public Transmit(Form frmOptions)
      {
      //a message box here is called and is displayed.
      this.StartTrans mit(frmOptions) ;
      }

      private void StartTransmit(F orm frmOptions)
      {
      //i put a message box here but it isnt being called
      }

      [/CODE]

      i even made sure that the parameter (frmOptions doesnt get cleanedup / disposed)

      Comment

      • Shashi Sadasivan
        Recognized Expert Top Contributor
        • Aug 2007
        • 1435

        #4
        Finally found that crystal reports had the wrong runtine installed on the client machines and error never got thrown whenthey were in the threads.

        However crystal reports throws an error about an incorrect logon info.

        I would presume that threads and error handling do not go together so well ?

        Comment

        Working...