代码看起来像这样
var request = WebRequest.Create(new Uri(reqStr, UriKind.Absolute));
request.Method = "POST";
request.Timeout = 15000;
Stream dataStream = request.GetRequestStream();
WebResponse response = request.GetResponse();
var dataStreamResp = response.GetResponseStream();
我每 10 秒调用一次,它工作正常。如果我禁用我的本地连接,然后启用,它仍然可以工作。但是,当服务器重新启动时,我收到超时异常(服务器在重新启动后工作)。问题是什么?