0

i save the file upload object in the session, and then use this session in the iframe, it works fine for VS web server for all file small or large

Issue :( => but on IIS it work fine for small size file, but gives error for larges files.

I THINK the reason is the file upload object dispose before completing the request so file steam in session not able to read the file.

can anyone tell me why it is not works for larges files and how can i get FileUpload object in other page

Vijay Singh Rana
  • 1,060
  • 14
  • 32

2 Answers2

0

Try this in your web.config file..

<system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="524288000"/>
            </requestFiltering>
        </security>
</system.webServer>

maxAllowedContentLength is in BYTES.

Hope this helps you..

If you didn't specify this, default limit will be 30MB

Sen Jacob
  • 3,384
  • 3
  • 35
  • 61
0

I found the solution :) I put this line to web config file and it solve the problem:

 <system.web>
    <httpRuntime maxRequestLength="30480" requestLengthDiskThreshold="30480"/> 
 </system.web>
Vijay Singh Rana
  • 1,060
  • 14
  • 32