Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
GeneralRe: Not getting the reason for 'Application.OnThreadException' raised. Pin
Richard MacCutchan10-Sep-10 2:12
mveRichard MacCutchan10-Sep-10 2:12 
GeneralRe: Not getting the reason for 'Application.OnThreadException' raised. Pin
Dave Kreskowiak10-Sep-10 2:13
mveDave Kreskowiak10-Sep-10 2:13 
QuestionCan not create file using FileStream in release mode Pin
ndkit9-Sep-10 17:23
ndkit9-Sep-10 17:23 
AnswerRe: Can not create file using FileStream in release mode Pin
Luc Pattyn9-Sep-10 17:50
sitebuilderLuc Pattyn9-Sep-10 17:50 
GeneralRe: Can not create file using FileStream in release mode Pin
ndkit9-Sep-10 22:04
ndkit9-Sep-10 22:04 
GeneralRe: Can not create file using FileStream in release mode Pin
DaveyM699-Sep-10 22:21
professionalDaveyM699-Sep-10 22:21 
AnswerRe: Can not create file using FileStream in release mode Pin
Luc Pattyn10-Sep-10 1:42
sitebuilderLuc Pattyn10-Sep-10 1:42 
QuestionThrottling web service calls on different threads Pin
Gareth H9-Sep-10 7:33
Gareth H9-Sep-10 7:33 
I have a web service that recieves calls from a number of clients (600 and growing). This calls a 3rd party web service to return some image data, which is then sent to the client.

If i spam the 3rd party service with several calls at once (around 20+), it grinds to a halt, and takes over 2 seconds per call to return, when it normally takes 0.3 seconds on a single call.

I noticed that if i throttle the calls (added a sleep of 500ms between each web request), the 3rd party runs fine.

The question is, whats the best way/how can i implement a throttling system in my code, so if i receive several calls on different threads, i dont send them all at once, but que them up, so the 3rd party server has time to respond.
Regards,
Gareth.

(FKA gareth111)

AnswerRe: Throttling web service calls on different threads Pin
Ian Shlasko9-Sep-10 8:10
Ian Shlasko9-Sep-10 8:10 
GeneralRe: Throttling web service calls on different threads Pin
Gareth H10-Sep-10 1:26
Gareth H10-Sep-10 1:26 
GeneralRe: Throttling web service calls on different threads Pin
Ian Shlasko10-Sep-10 1:46
Ian Shlasko10-Sep-10 1:46 
GeneralRe: Throttling web service calls on different threads Pin
Gareth H10-Sep-10 1:50
Gareth H10-Sep-10 1:50 
AnswerRe: Throttling web service calls on different threads Pin
Luc Pattyn9-Sep-10 11:12
sitebuilderLuc Pattyn9-Sep-10 11:12 
GeneralRe: Throttling web service calls on different threads Pin
Gareth H10-Sep-10 1:37
Gareth H10-Sep-10 1:37 
AnswerRe: Throttling web service calls on different threads Pin
Abhinav S9-Sep-10 17:30
Abhinav S9-Sep-10 17:30 
GeneralRe: Throttling web service calls on different threads Pin
Gareth H9-Sep-10 21:07
Gareth H9-Sep-10 21:07 
Questionsearch and save to SQL using LINQ in C# Pin
navidsoft9-Sep-10 6:07
professionalnavidsoft9-Sep-10 6:07 
AnswerRe: search and save to SQL using LINQ in C# Pin
Ian Shlasko9-Sep-10 10:42
Ian Shlasko9-Sep-10 10:42 
GeneralRe: search and save to SQL using LINQ in C# Pin
navidsoft9-Sep-10 21:21
professionalnavidsoft9-Sep-10 21:21 
GeneralRe: search and save to SQL using LINQ in C# Pin
Ian Shlasko10-Sep-10 1:43
Ian Shlasko10-Sep-10 1:43 
QuestionCasting ItemsControl.ItemsSource to Generic Collection Pin
Jammer9-Sep-10 5:11
Jammer9-Sep-10 5:11 
AnswerRe: Casting ItemsControl.ItemsSource to Generic Collection Pin
#realJSOP9-Sep-10 7:29
mve#realJSOP9-Sep-10 7:29 
AnswerRe: Casting ItemsControl.ItemsSource to Generic Collection Pin
Ian Shlasko9-Sep-10 10:51
Ian Shlasko9-Sep-10 10:51 
GeneralRe: Casting ItemsControl.ItemsSource to Generic Collection Pin
Jammer9-Sep-10 23:53
Jammer9-Sep-10 23:53 
AnswerRe: Casting ItemsControl.ItemsSource to Generic Collection Pin
Paul Michalik10-Sep-10 9:30
Paul Michalik10-Sep-10 9:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.