Page 1 of 1

Creating a chart breaks my WCF service

Posted: Tue Sep 14, 2010 10:07 pm
by 14045174
I am looking at adding a WCF service to my product, and it looks like TChart is interfering somehow. I have attached a sample project that reproduces the problem.

If you run the code with the line that creates a TChart commented out, the program works just fine. If you comment in the line, you get a TimeoutException. The sample project has both the client & server code in the same process, but you get the same result if you have the code in different projects.

Re: Creating a chart breaks my WCF service

Posted: Thu Sep 16, 2010 10:04 am
by 10050769
Hello UserLs,


We haven't forgotten you. We'll answer you asap.


Thanks,

Re: Creating a chart breaks my WCF service

Posted: Thu Sep 16, 2010 2:28 pm
by 14045174
I found a fix for this. It ended up that as part of creating a TChart, a form would get created, which would set the SynchronizationContext. Since I don't care to have all of the server call synchronized with the UI thread, I just turned off the UseSynchronizationContext, and everything works now.