在web.config文件的 <configuration> </configuration>
中添加<httpRuntime executionTimeout="90" maxRequestLength="100000" useFullyQualifiedRedirectUrl="false" />

解决方案 »

  1.   

    用dataset的 WriteXml()方法.
    private void WriteXmlToFile(DataSet thisDataSet) {
        if (thisDataSet == null) { return; }
        // Create a file name to write to.
        string filename = "myXmlDoc.xml";
        // Create the FileStream to write with.
        System.IO.FileStream myFileStream = new System.IO.FileStream
           (filename, System.IO.FileMode.Create);
        // Create an XmlTextWriter with the fileStream.
        System.Xml.XmlTextWriter myXmlWriter = 
           new System.Xml.XmlTextWriter(myFileStream, System.Text.Encoding.Unicode);
        // Write to the file with the WriteXml method.
        thisDataSet.WriteXml(myXmlWriter);   
        myXmlWriter.Close();
     }
      

  2.   

    在web.config中设置<configuration>
       <system.web>
          <httpRuntime
                  executionTimeout="3600"
                  maxRequestLength="1048576"/>
       </system.web>
    </configuration>executionTimeout  为超时时间
    maxRequestLength  为最大文件大小,默认4096(单位为k)
      

  3.   

    请你查询前几天的问题,刚有人提过啊,多找找别来来就提问
    pcuser(晚风)的是对的
      

  4.   

    问题是我已经作了如上设置,你们没有看见吗?executionTimeout="9000"maxRequestLength="999999999"还出错,你们没有遇到过问题吗?你们使用上面的方法最大的上传文件能到多大?