views:

29

answers:

1

I`m using vs2008. I added a webform with the following code:

<form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td>
                    upload image:
                </td>
                <td>
                    <asp:FileUpload ID="FUImage" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:Button ID="BtnUpload" runat="server" Text="Add" />
                </td>
            </tr>
        </table>
    </div>
    </form>

and in cs file is nothing, except default pageload handler that is empty.

I run webapplication, , choosing a jpg file to upload, clicking add new button and see internet explorer can`t show the page specified message.

+1  A: 

.NET can limit the size of requests to the server which obviously limits the maximum size of uploadable files.

http://msdn.microsoft.com/en-us/library/e1f13641.aspx explains the appropriate web.config attribute, in particular the maxRequestLength attribtue.

Chris