Creating a chart breaks my WCF service

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Creating a chart breaks my WCF service

Post by UserLS » Tue Sep 14, 2010 10:07 pm

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.
Attachments
TeeChartWCF.zip
(4.32 KiB) Downloaded 471 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Creating a chart breaks my WCF service

Post by Sandra » Thu Sep 16, 2010 10:04 am

Hello UserLs,


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


Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Re: Creating a chart breaks my WCF service

Post by UserLS » Thu Sep 16, 2010 2:28 pm

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.

Post Reply