When I call the GetResponse method, it return a null status.
This is the code
String URI = "http://" + serverIP + "/testPoll/signalr?"; pollString = URI + "transport=longPolling"; pollString += "&connectionId=" + _connectionID; pollString += "&connectionData=" + Tools.RawUrlEncode("[{\"name\":\"testPoll.Chat\",\"methods\":[\"addMessage\"]}]"); pollString += "&messageID=" + 45; pollString += "&groups=" + Tools.RawUrlEncode("[\"testPoll.Chat.foo\"]"); pollString += "\r\n"; var request = (HttpWebRequest)WebRequest.Create(pollString); request.Method = "GET"; request.KeepAlive = false; try { var httpResponse = (HttpWebResponse)request.GetResponse(); [...]
When I inspect on httpResponse, I have:
ContentEncoding: 'HttpResponse.ContentEncoding threw an Exception of type 'System.NullReferenceException'
ContentType: 'HttpResponse.ContentType threw an Exception of type 'System.NullReferenceException'
and the HttpStatus is "null".
Why I obtain this null Response?
- Stefan likes this