急,高分求助!我的網站中有一個葉面在response.redirect("aa.aspx")事件時候,出現
“The following error was encountered: 
Read Error 
(104) Connection reset by peer”
請大蝦們幫忙!

解决方案 »

  1.   

    经常出现的Connection reset by peer: 原因可能是多方面的,不过更常见的原因是:①:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;②:客户关掉了浏览器,而服务器还在给客户端发送数据;③:浏览器端按了Stop
      

  2.   

    执行response.redirect("aa.aspx")语句的页面中的Connection是否已经关闭?
      

  3.   

    是有防火墙,但是这个网站的其它叶面都可以访问,现在发现点这个叶面中的任何一个按钮都报这个错。
    叶面初始化的时候的代码
    private void Page_Load(object sender, System.EventArgs e)
    {
    // 在这里放置使用者程序代码以初始化网页
    if(!IsPostBack)
    {

    if(Session["userid"] ==null)
    {
    Response.Redirect("../login.aspx");
    }
    else
    {

    getbu();
    ecoam.Clear();
    boxlistm.Clear();
    digitm.Clear();
    hif.Clear();
    arr.Clear();
    i=0;
    //  jy();
    // Move("D:\\CC","D:\\files");
    }
    }
    else
    {


    if (ECOAAttachFile.Value!="")
    { ecoam.Add(ECOAAttachFile);
    ECOAAttachFile=((System.Web.UI.HtmlControls.HtmlInputFile)ecoam[0]);
    this.TextBox1.Text=((System.Web.UI.HtmlControls.HtmlInputFile)ecoam[0]).Value;
    this.TextBox1.Visible=true;
    ButtonECOA.Visible =true;
    ECOAAttachFile.Visible =false;
    }
    //**

    if (BoxingListAttachFile.Value!="")
    {

    boxlistm.Add(BoxingListAttachFile);
    BoxingListAttachFile=((System.Web.UI.HtmlControls.HtmlInputFile)boxlistm[0]);
    this.TextBoxBox.Text=((System.Web.UI.HtmlControls.HtmlInputFile)boxlistm[0]).Value;
    this.TextBoxBox.Visible=true;
    this.BoxingListAttachFile.Visible =false;
    this.ButtonBOX.Visible =true;
    }

    //***

    if (DigitalPackingListFile.Value!="")
    { digitm.Add(DigitalPackingListFile);
    DigitalPackingListFile=((System.Web.UI.HtmlControls.HtmlInputFile)digitm[0]);
    this.TextBoxDIGIT.Text=((System.Web.UI.HtmlControls.HtmlInputFile)digitm[0]).Value;
    this.TextBoxDIGIT.Visible=true;
    this.DigitalPackingListFile.Visible =false;
    this.ButtonDIGIT.Visible =true;
    }
    }        }
      

  4.   

    问题解决了,我把页面上的filefiled上传控件删除再重新建立一个就好了,这个是.net的bug问题!
      

  5.   

    private DataTable GetData()
    {
    string constr = "server=INLLHBI01;database=INNOLUX;uid=biadm;pwd=bidwh;";
    SqlConnection myConn = new SqlConnection(constr); myConn.Open(); string cmdstr = "";
    string subCmdstr=""; subCmdstr += " select sizeid,versionid,B.gradeid,sum(Qty) qty ";
    subCmdstr += " from innolux.dbo.fact_pipeline a left join innolux.dbo.Dim_PipeLine_Grade  b  on a.inlpnid=b.innoluxpn ";
    subCmdstr += " where STATIONID='MOD BU' and convert(float,left(sizeid,CHARINDEX('\"',SIZEID)-1))>=14.1 ";
    subCmdstr += " group by  sizeid,versionid,B.gradeid "; cmdstr += subCmdstr;
    cmdstr += " union  ";
    cmdstr += " select sizeid,'zsubtotal' as versionid,'zsubtotal' as gradeid,sum(qty) qty " ;
    cmdstr += " from  ";
    cmdstr += " ( ";
    cmdstr += subCmdstr;
    cmdstr += " ) t ";
    cmdstr += " group by sizeid ";
    cmdstr += " union ";
    cmdstr += " select 'ztotal' sizeid,'ztotal' versionid,'ztotal' gradeid,sum(qty) qty ";
    cmdstr += " from  ";
    cmdstr += " ( ";
    cmdstr += subCmdstr;
    cmdstr +=" ) t ";
    SqlDataAdapter da = new SqlDataAdapter(cmdstr,myConn);
    DataTable dt  = new DataTable();

    da.Fill(dt); myConn.Close();
    myConn.Dispose(); return dt;
    }
    #endregion
    //從起動后到第一次執行的時間
    public override long GetDueTime()
    {
    // return timeTo("05:00:00");
    return 1000;
    }
    private long timeTo(string exeTime)
    {
    DateTime now = DateTime.Now;
    DateTime exeDateTime = DateTime.Parse(now.Date.ToString("yyyy/MM/dd") + " " + exeTime);
    if(exeDateTime < now)
    {
    exeDateTime = exeDateTime.AddDays(1);
    }

    TimeSpan ts = exeDateTime.Subtract(now);
    long totalMilliseconds = ts.Days * 86400000 + ts.Hours * 3600000 + ts.Minutes * 60000 + ts.Seconds * 1000 + ts.Milliseconds;
    return totalMilliseconds;
    } //時隔多久執行下一次
    public override long GetPeriod()
    {
    // return 60000;
    return 86400000;
    } }
    }