ywt348861900 2019-01-25 18:00
浏览 1976

基础连接已经关闭: 服务器关闭了本应保持活动状态的连接

**_************** 异常文本 **************
System.Net.WebException: 基础连接已经关闭: 服务器关闭了本应保持活动状态的连接。 ---> System.IO.IOException: 无法从传输连接中读取数据: 您的主机中的软件中止了一个已建立的连接。。 ---> System.Net.Sockets.SocketException: 您的主机中的软件中止了一个已建立的连接。
   在 System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   在 System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   在 System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   在 System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   在 System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   在 SendClient.WebReference_PACS.Service1.addImage(String ConID, String SOPInstanceUID, String filename)
   在 SendClient.Form1.addImage(String ConID, String SOPInstanceUID, String filename)
   在 SendClient.Form1.button_newcon_send_Click(Object sender, EventArgs e)
   在 System.Windows.Forms.Control.OnClick(EventArgs e)
   在 System.Windows.Forms.Button.OnClick(EventArgs e)
   在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
   在 System.Windows.Forms.Button.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)*

     ************** 已加载的程序集 **************

网上很多都是说在Reference.cs里面添加
protected override WebRequest GetWebRequest(Uri uri)
{
HttpWebRequest webRequest = (HttpWebRequest)
base.GetWebRequest(uri);
 webRequest.KeepAlive = false;
return webRequest;
}

但是添加了一直提示“错误 52 应输入 class、delegate、enum、interface 或 struct ”

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料