Uploading large files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Phong Pham

    Uploading large files

    I'm creating a web page to upload files, but I'm having a problem uploading
    files larger than about 3.5 mb. Anything smaller than 3.5 mb is ok. If the
    file is larger, it doesn't generate an error, it just doesn't do anything.
    Can anyone show me how to fix that problem?

    I'm also trying to trap any files larger than 3.5 mb to let the user know
    that they can't upload files larger than that:

    If MyUpload.Posted File.ContentLen gth > 3500000 then
    lblMessage.Text = "File size cannot exceed 3.5 mb limit"
    End If

    But if the file is 4 mb or bigger, that code doesnt' catch it. Any ideas?

    Thanks first
    Phong



  • Steve C. Orr, MCSD

    #2
    Re: Uploading large files

    You need to add or modify the following section in your web.config file:

    <configuratio n>
    <system.web>
    <httpRuntime maxRequestLengt h="4096" />
    </system.web>
    </configuration>

    The above value (4096 KB) is the default maximum upload file size.

    --
    I hope this helps,
    Steve C. Orr, MCSD



    "Phong Pham" <ppham45@hotmai l.com> wrote in message
    news:e$UNzBAQDH A.1624@tk2msftn gp13.phx.gbl...[color=blue]
    > I'm creating a web page to upload files, but I'm having a problem[/color]
    uploading[color=blue]
    > files larger than about 3.5 mb. Anything smaller than 3.5 mb is ok. If the
    > file is larger, it doesn't generate an error, it just doesn't do anything.
    > Can anyone show me how to fix that problem?
    >
    > I'm also trying to trap any files larger than 3.5 mb to let the user know
    > that they can't upload files larger than that:
    >
    > If MyUpload.Posted File.ContentLen gth > 3500000 then
    > lblMessage.Text = "File size cannot exceed 3.5 mb limit"
    > End If
    >
    > But if the file is 4 mb or bigger, that code doesnt' catch it. Any ideas?
    >
    > Thanks first
    > Phong
    >
    >
    >[/color]


    Comment

    Working...