473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

Shashi Sadasivan
1,435 Expert 1GB
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
Mar 26 '08 #1
3 1331
Shashi Sadasivan
1,435 Expert 1GB
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.
Mar 26 '08 #2
Shashi Sadasivan
1,435 Expert 1GB
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:

Expand|Select|Wrap|Line Numbers
  1. class Trasmit
  2. {
  3.    public Transmit(Form frmOptions)
  4.    {
  5.       //a message box here is called and is displayed.
  6.       this.StartTransmit(frmOptions);
  7.    }
  8.  
  9.    private void StartTransmit(Form frmOptions)
  10.    {
  11.       //i put a message box here but it isnt being called
  12.    }
  13.  
  14.  
i even made sure that the parameter (frmOptions doesnt get cleanedup / disposed)
Mar 27 '08 #3
Shashi Sadasivan
1,435 Expert 1GB
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 ?
Mar 27 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: john wright | last post by:
I have my code done to populate a treeview, but when I move it to the backgroundworker I get an error "Action being performed on this control is being called from the wrong thread. Marshal to the...
2
by: Sebastian Crewe | last post by:
Greetings, I was much encouraged to see the new BackgroundWorker class in .NET v2. On the face of it, much easier to use than the various delegates and events of yore, though I imagine the same...
4
by: DHarry | last post by:
Can anybody tell me, whats the main difference between a BackgroundWorker and a Thread? What are the advantages/disadvanteges? When use a BackgroundWorker, when a Thread?
5
by: Rob R. Ainscough | last post by:
I'm using a BackgroundWorker to perform a file download from an ftp site. Per good code design practices where I separate my UI code from my core logic code (in this case my Download file method in...
3
by: Hardy Wang | last post by:
Hi all, I am migrating a Windows Form application from .Net 1.1 to 2.0. I try to use BackgroundWorker object to handle a very lengthy process. I have a separated class to handle some very complex...
3
by: ray.ackley | last post by:
Hello all, I have an app that uses a BackgroundWorker() object to read USB data that is being fed in serially (FT245R chip, www.ftdichip.com). It looks just like a serial data stream. Anyhow,...
14
by: =?Utf-8?B?SXNobWFlbA==?= | last post by:
Hi, I have a form with a progress bar on it and wanted to use the BackgroundWorker to be able to update the progress. I looked at examples, run some of them, but in debug, when the code gets to...
9
by: RvGrah | last post by:
I'm completely new to using background threading, though I have downloaded and run through several samples and understood how they worked. My question is: I have an app whose primary form...
0
by: antarikshv | last post by:
Hello All, I had written a piece of code for working with the BackgroundWorker.Following is the code for the same: BackgroundWorker ^ defReportWorker = gcnew BackgroundWorker();...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.