这是IIS限制了,解决办法如下:
windows2003的IIS有限制文件上传大小问题超过200K的文件就传不上去了,大家可要注意了,以后要是用IIS6.0做服务器可就要注意了,Win2003的IIS 6.0对asp的上传文件大小为200k限制,aspx的上传程序没有影响。在IIS6.0中,默认设置是特别严格和安全的,最大只能传送 204,800 个字节,这样可以最大限度地减少因以前太宽松的超时和限制而造成的攻击。IIS 6 出于安全考虑, 默认最大请求是200K(也即最大提交数据限额为200KByte,204800Byte)。(在 IIS 6.0 之前的版本中无此限制)。 
解决办法: 
1. 关闭 IIS Admin Service 服务 
2. 打开 %WinDir%\system32\inetsrv\metabase.xml
3. 修改 AspMaxRequestEntityAllowed 的值为自己需要的, 默认为 204800
4. 启动 IIS Admin Service

解决方案 »

  1.   

    WebForm1.aspx   
        
      <%@   Page   language="c#"   Codebehind="WebForm1.aspx.cs"   AutoEventWireup="false"   Inherits="CSharpUpload.WebForm1"   %>   
      <!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.0   Transitional//EN"   >   
      <HTML>   
          <HEAD>   
              <title>WebForm1</title>   
              <meta   name="GENERATOR"   Content="Microsoft   Visual   Studio   7.0">   
              <meta   name="CODE_LANGUAGE"   Content="C#">   
              <meta   name=vs_defaultClientScript   content="JavaScript">   
              <meta   name=vs_targetSchema   content="http://schemas.microsoft.com/intellisense/ie5">   
          </HEAD>   
          <body   MS_POSITIONING="GridLayout">   
      <form   id="Form1"   method="post"   enctype="multipart/form-data"   runat="server">   
      <INPUT   type=file   id=File1   name=File1   runat="server"   >   
      <br>   
      <input   type="submit"   id="Submit1"   value="Upload"   runat="server"   NAME="Submit1">   
      </form>   
        
        
          </body>   
      </HTML>   
        
        
        
      WebForm1.aspx.cs   
        
      using   System;   
      using   System.Collections;   
      using   System.ComponentModel;   
      using   System.Data;   
      using   System.Drawing;   
      using   System.Web;   
      using   System.Web.SessionState;   
      using   System.Web.UI;   
      using   System.Web.UI.WebControls;   
      using   System.Web.UI.HtmlControls;   
        
      namespace   CSharpUpload   
      {   
      ///   <summary>   
      ///   Summary   description   for   WebForm1.   
      ///   </summary>   
      public   class   WebForm1   :   System.Web.UI.Page   
      {   
      protected   System.Web.UI.HtmlControls.HtmlInputFile   File1;   
      protected   System.Web.UI.HtmlControls.HtmlInputButton   Submit1;   
        
      private   void   Page_Load(object   sender,   System.EventArgs   e)   
      {   
      //   Put   user   code   to   initialize   the   page   here   
      }   
        
      #region   Web   Form   Designer   generated   code   
      override   protected   void   OnInit(EventArgs   e)   
      {   
      //     
      //   CODEGEN:   This   call   is   required   by   the   ASP.NET   Web   Form   Designer.   
      //     
      InitializeComponent();   
      base.OnInit(e);   
      }   
        
      ///   <summary>   
      ///   Required   method   for   Designer   support   -   do   not   modify   
      ///   the   contents   of   this   method   with   the   code   editor.   
      ///   </summary>   
      private   void   InitializeComponent()   
      {           
      this.Submit1.ServerClick   +=   new   System.EventHandler(this.Submit1_ServerClick);   
      this.Load   +=   new   System.EventHandler(this.Page_Load);   
        
      }   
      #endregion   
        
      private   void   Submit1_ServerClick(object   sender,   System.EventArgs   e)   
      {   
      if(   (   File1.PostedFile   !=   null   )   &&   (   File1.PostedFile.ContentLength   >   0   )   )   
      {   
      string   fn   =   System.IO.Path.GetFileName(File1.PostedFile.FileName);   
      string   SaveLocation   =   Server.MapPath("Data")   +   "\\"   +     fn;   
      try   
      {   
      File1.PostedFile.SaveAs(SaveLocation);   
      Response.Write("The   file   has   been   uploaded.");   
      }   
      catch   (   Exception   ex   )   
      {   
      Response.Write("Error:   "   +   ex.Message);   
      }   
      }   
      else   
      {   
      Response.Write("Please   select   a   file   to   upload.");   
      }   
      }   
      }   
      }   
      

  2.   

    改改webconfig文件 新加  
    <httpRuntime maxRequestLength="上传文件最大字节数"/>
      

  3.   

    不知道你要上传的文件有多大,请参考思归的文章:
    用ASP.NET上传大文件
    http://blog.joycode.com/saucer/archive/2004/03/16/16225.aspx
      

  4.   

    <!--设置上传单个文件的最大Size-->
        <httpRuntime maxRequestLength="10240" executionTimeout="3600"/>
      

  5.   

    Enctype 参数
    enctype ="multipart/form-data"
    当使用这种格式后,就是将<INPUT type="file">选中的文件内容以二进制形式上传到服务器.如果不使用,就只将选中的文件名的字符串上传的服务器<form id="Form1" method="post" enctype="multipart/form-data" runat="server">
    <INPUT id="File1"  type="file"  name="File1" runat="server">
    <asp:Button id="Button1"  runat="server"Text="上传"></asp:Button>
    </form>
    -----------------------服务器
    //文件在用户端的盘符路径文件名
    string Cfilename=File1.PostedFile.FileName;string filename=System.IO.Path.GetFileName(Cfilename);

    string serverPath =string.Format(@"c:\temp\{0}",filename);

    //保存文件
    File1.PostedFile.SaveAs(serverPath);this.Response.Write("文件名:" + filename + "<p>");
    this.Response.Write("文件大小" + filesize + "<p>");this.Response.Write("上传成功");web config
    <httpRuntime executionTimeout="300" maxRequestLength="1000000" useFullyQualifiedRedirectUrl="false"/>
      

  6.   

    http://wucountry.cnblogs.com/archive/2005/12/28/306725.aspx
      

  7.   

    http://www.cnblogs.com/bestcomy/archive/2004/06/09/14267.aspx
      

  8.   

    http://www.cnblogs.com/outman2008/archive/2006/01/07/312823.html
      

  9.   

    随便Google一下就有,很多人做过了。
      

  10.   

    <!--设置上传单个文件的最大Size-->
        <httpRuntime maxRequestLength="10240" executionTimeout="3600"/>
    --------------------
    up
      

  11.   

    如果要上传的文件超过100MB,同时系统是多人使用的话,可能需要借助于支持断点续传功能的控件来实现。比如QQ邮箱中的断点续传控件,115网盘中的断点续传控件,华为网盘中的断点续传控件(DBank)像这样的断点续传控件是将一个大文件分成许多小的文件块,然后依次循环上传一小块文件。这样可以减轻服务器的压力,通过这种方式能够上传10G左右的文件。应该能够满足你的需求。传统ASP.NET大文件上传的方法估记100MB服务器就扛不住了,如果同时有许多用户上传的话,那服务器肯定会挂。
      

  12.   

    现在网上已经有成熟的大文件上断点续传控件了,楼主可以在网上搜一下。传统的ASP.NET文件上传方式无法上传大文件。因为如果网络环境不是很好的话文件上传一会连接就会断开。此控件支持2G文件的断点续传操作,提供了完善的开发文档,支持文件MD5验证,支持文件批量上传。
    文件MD5值计算进度:文件MD5值计算完毕文件上传中文件上传完毕
      

  13.   

    非常不错,最近我们公司在做一个视频网站的项目,我在网上到处找都没找到。找了一些Flash的控件,但是不支持断点续传,在公网做测试一个200MB的文件都没办法上传。而且经常连接中断。能不能把这个控件的地址发一下。谢谢。
      

  14.   

    网上有,可以搜到。http://www.cnblogs.com/xproer/archive/2012/02/17/2355440.html
      

  15.   

    http://www.cnblogs.com/zhongweiv/archive/2011/11/29/CutAvatar.html
      

  16.   

    建议转成Ftp上传,如果文件过大,服务器压力不小