Asynchronous HttpWebRequest giving exception in C# language compact framework?
I have pasted the code from msdn, from http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.begingetrequeststream.aspx in a sample application. But this gives error for contentLengh, so i have provided that. then it executes well. But at following point, it throws exception of InvalidOperationException and NotSupportedExcept开发者_开发百科ion.
Stream postStream = request.EndGetRequestStream(asynchronousResult); //dies here
I tried the code in my application with my web service, but still the same exception.
I have tried request.sendChunked = true, but that does not resolve the error.
I dont know what is wrong with it.
I am coding with c# on net compact framework, I have a login page, for which login request goes to server. Then I want to show a page with custom progress bar on login request, and hide the page when I get back the response. So I am using asynchronous HttpWebRequest. Please help, if anything is wrong in the code, or if there is some other solution to show the custom progress bar. any help would be greatly appreciated.
Thanks in advance. Mishal Shah
精彩评论