Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

HttpWebRequest hangs

$
0
0

This is frequent question, but I tried everything and nothing helps.

HttpWebRequest hangs at line with GetResponse call. I already checked usings, connection limits and even disabled 100 Continue. I know there was bug with HttpWebRequest in .Net Framework 3.5, but version of my application pool is 4.0. Request from browser or constructed with Fiddler works as expected, page is accessible. What could it be else?

Below are traces:

System.Net Verbose: 0 : [5660] WebRequest::Create(http://localhost:1000//<page>)
System.Net Verbose: 0 : [5660] HttpWebRequest#17370009::HttpWebRequest(http://localhost:1000//<page>)
System.Net Information: 0 : [5660] Current OS installation type is 'Client'.
System.Net Information: 0 : [5660] RAS supported: True
System.Net Verbose: 0 : [5660] Exiting HttpWebRequest#17370009::HttpWebRequest()
System.Net Verbose: 0 : [5660] Exiting WebRequest::Create()  -> HttpWebRequest#17370009
System.Net Verbose: 0 : [5660] ServicePoint#22112358::ServicePoint(localhost:1000)
System.Net Information: 0 : [5660] Associating HttpWebRequest#17370009 with ServicePoint#22112358
System.Net Verbose: 0 : [5660] HttpWebRequest#17370009::GetRequestStream()
System.Net Information: 0 : [5660] Associating Connection#64793495 with HttpWebRequest#17370009
System.Net Information: 0 : [5660] Connection#64793495 - Created connection from 127.0.0.1:55408 to 127.0.0.1:1000.
System.Net Information: 0 : [5660] Associating HttpWebRequest#17370009 with ConnectStream#46270551
System.Net Verbose: 0 : [5660] Exiting HttpWebRequest#17370009::GetRequestStream()  -> ConnectStream#46270551
System.Net Verbose: 0 : [5660] ConnectStream#46270551::Write()
System.Net Verbose: 0 : [5660] Data from ConnectStream#46270551::Write
System.Net Verbose: 0 : [5660] 00000000 : <Data>
System.Net Verbose: 0 : [5660] 00000010 : <Data>
System.Net Verbose: 0 : [5660] 00000020 : <Data>
System.Net Verbose: 0 : [5660] Exiting ConnectStream#46270551::Write()
System.Net Verbose: 0 : [5660] ConnectStream#46270551::Close()
System.Net Verbose: 0 : [5660] Exiting ConnectStream#46270551::Close()
System.Net Verbose: 0 : [5660] ConnectStream#46270551::Close()
System.Net Verbose: 0 : [5660] Exiting ConnectStream#46270551::Close()
System.Net Verbose: 0 : [5660] HttpWebRequest#17370009::GetResponse()
System.Net Information: 0 : [5660] HttpWebRequest#17370009 - Request: POST //<page> HTTP/1.1

System.Net Information: 0 : [5660] ConnectStream#46270551 - Sending headers
{
Content-Type: application/x-www-form-urlencoded
Host: localhost:1000
Content-Length: 45
Connection: Keep-Alive
}.
System.Net Verbose: 0 : [5660] Data from ConnectStream#46270551::ResubmitWrite
System.Net Verbose: 0 : [5660] 00000000 : <Data>
System.Net Verbose: 0 : [5660] 00000010 : <Data>
System.Net Verbose: 0 : [5660] 00000020 : <Data>

Stack trace:

  System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) Unknown
  System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) Unknown
  System.dll!System.Net.Sockets.NetworkStream.Read(byte[] buffer, int offset, int size) Unknown
  System.dll!System.Net.PooledStream.Read(byte[] buffer, int offset, int size) Unknown
  System.dll!System.Net.Connection.SyncRead(System.Net.HttpWebRequest request, bool userRetrievedStream, bool probeRead) Unknown
  System.dll!System.Net.ConnectStream.ProcessWriteCallDone(System.Net.ConnectionReturnResult returnResult) Unknown
  System.dll!System.Net.HttpWebRequest.WriteCallDone(System.Net.ConnectStream stream, System.Net.ConnectionReturnResult returnResult) Unknown
  System.dll!System.Net.ConnectStream.CallDone(System.Net.ConnectionReturnResult returnResult) Unknown
  System.dll!System.Net.ConnectStream.ResubmitWrite(System.Net.ConnectStream oldStream, bool suppressWrite) Unknown
  System.dll!System.Net.HttpWebRequest.EndWriteHeaders_Part2() Unknown
  System.dll!System.Net.HttpWebRequest.EndWriteHeaders(bool async) Unknown
  System.dll!System.Net.HttpWebRequest.WriteHeadersCallback(System.Net.WebExceptionStatus errorStatus, System.Net.ConnectStream stream, bool async) Unknown
  System.dll!System.Net.ConnectStream.WriteHeaders(bool async) Unknown
  System.dll!System.Net.HttpWebRequest.EndSubmitRequest() Unknown
  System.dll!System.Net.HttpWebRequest.CheckDeferredCallDone(System.Net.ConnectStream stream) Unknown
  System.dll!System.Net.HttpWebRequest.GetResponse() Unknown


Viewing all articles
Browse latest Browse all 8156

Trending Articles