[Mono-bugs] [Bug 691517] New: Server error (as WebException) leaves HttpWebRequest in incorrect state
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue May 3 15:14:46 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=691517
https://bugzilla.novell.com/show_bug.cgi?id=691517#c0
Summary: Server error (as WebException) leaves HttpWebRequest
in incorrect state
Classification: Mono
Product: Mono: Class Libraries
Version: 2.10.x
Platform: Other
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: sgsghu at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Description of Problem: After webserver have sent back error code (e.g. 404)
and WebException has been thrown, the next try with the same WebRequest fails
with InvalidOperationException (instead of another WebException).
Steps to reproduce the problem:
1. Run the following code:
WebRequest req = WebRequest.Create("http://foo.bar");
try {
req.GetResponse();
} catch (WebException) {
Console.WriteLine("gotcha!");
}
try {
req.GetResponse();
} catch (WebException) {
Console.WriteLine("gotcha!");
}
Actual Results:
Unhandled Exception: System.InvalidOperationException: Cannot re-call start of
asynchronous method while a previous call is still in progress.
at System.Net.HttpWebRequest.BeginGetResponse (System.AsyncCallback callback,
System.Object state) [0x00185] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.2\mcs\class\System\System.Net\HttpWebReq
uest.cs:817
at System.Net.HttpWebRequest.GetResponse () [0x00000] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.2\mcs\class\System\System.Net\HttpWebRequest.cs:841
Expected Results:
Two gotcha!-s (WebExceptions) as in .NET.
How often does this happen?
Always.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list