File1.PostedFile.SaveAs(fileSavePath);
我上传的文件大于3M,就显示“该页无法显示”,如果文件小上传就正常,不知为什么

解决方案 »

  1.   

    Upload Larger Files
    By default, ASP.NET only permits files that are 4,096 kilobytes (KB) (or 4 MB) or less to be uploaded to the Web server. To upload larger files, you must change the maxRequestLength parameter of the <httpRuntime> section in the Web.config file.If you want to change this setting for all of the computer and not just this ASP.NET application, you must modify the Machine.config file.By default, the <httpRuntime> element is set to the following parameters in the Machine.config file: 
    <httpRuntime 
    executionTimeout="90" 
    maxRequestLength="4096"
    useFullyQualifiedRedirectUrl="false" 
    minFreeThreads="8" 
    minLocalRequestFreeThreads="4"
    appRequestQueueLimit="100"
    /> 
    The Machine.config file is located in the C:\WINNT\Microsoft.NET\Framework\v1.0.3705\CONFIG directory.