如果应用程序在调用 Web 服务后进入后台,为什么 Web 服务的响应会崩溃?有谁知道让Web服务在后台工作的解决方法。在第二行代码下面我的应用程序崩溃.....
HttpWebRequest request = (HttpWebRequest)asynchronousResult.AsyncState;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(asynchronousResult);//Crash
Stream streamResponse = response.GetResponseStream();
StreamReader streamRead = new StreamReader(streamResponse);
string responseString = streamRead.ReadToEnd();
……