Forum Discussion
All API calls failing after the 3rd consecutive call...
- Anonymous9 years ago
For the record, I found a temporary solution for this until they fix this bug: Closing the ConnectionGroup after each WebRequest is completed.
Assuming "wr" is your HttpWebRequest var, just use this line after you call wr.GetResponse.
wr.ServicePoint.CloseConnectionGroup(wr.ConnectionGroupName)
No more timeouts after the 2nd API POST call.
Is there some workaround in the meantime? Do you know why it fails on the 3rd consequtive call in an instance of a program, but will work again once you restart that same program? I'm disposing of all my objects, and each API call uses a unique WebRequest, so I'm trying to figure out how it even knows that the 3rd call is from the same instance of a program and the 4th (after a restart) is not.
Anonymous wrote:
Is there some workaround in the meantime? Do you know why it fails on the 3rd consequtive call in an instance of a program, but will work again once you restart that same program? I'm disposing of all my objects, and each API call uses a unique WebRequest, so I'm trying to figure out how it even knows that the 3rd call is from the same instance of a program and the 4th (after a restart) is not.
Anonymous
I've not yet got any update and I'll follow in this thread once I got any new information. Thanks for your patience.
- Anonymous9 years agoNot applicable
For the record, I found a temporary solution for this until they fix this bug: Closing the ConnectionGroup after each WebRequest is completed.
Assuming "wr" is your HttpWebRequest var, just use this line after you call wr.GetResponse.
wr.ServicePoint.CloseConnectionGroup(wr.ConnectionGroupName)
No more timeouts after the 2nd API POST call.