Click here to Skip to main content
15,917,636 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I get the error "System.ArgumentException: Stream was not writable"
at the line
using (requestWriter = new StreamWriter(request.GetRequestStream()))
during the reuse(ie.,when using whitin the loop). Your help is appriciated!
Posted
Comments
Member 2053006 19-Sep-13 9:54am    
It is possible that the stream returned from request.GetRequestStream() is being disposed within the using block, as it goes out of scope as soon as the using block is entered.

1 solution

VB
I don't think its possible to reuse the request stream. So, I've created
 a new (Http)WebRequest instance.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900