Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 27th, 2003, 11:20 AM
Authorized User
 
Join Date: Jun 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default uploading large files a 4Mb limit seems present!


Hi all,

I have aritten an application which uploads students' files for marking and after having successfully uploaded some 1700 pieces of work I have now found that if the file exceeds about 4Mb then the following code snippet doesn't work. Any help would be much appreciated!

best

Grahame

postedFile.SaveAs(new_pathname);

Best wishes,
Grahame

Grahame Hambleton
Webmaster / Developer
Saïd Business School
University of Oxford
Saïd Business School
Park End Street
Oxford OX1 1HP
Tel: +44 (0) 1865 288863
Fax: +44 (0) 1865 288805
email: [email protected]
http://www.sbs.ox.ac.uk
__________________
Best wishes,
Grahame

Grahame Hambleton
Webmaster / Developer
Saïd Business School
University of Oxford
Saïd Business School
Park End Street
Oxford OX1 1HP
Tel: +44 (0) 1865 288863
Fax: +44 (0) 1865 288805
email: [email protected]
http://www.sbs.ox.ac.uk
 
Old December 1st, 2003, 12:16 PM
Authorized User
 
Join Date: Nov 2003
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to KABay
Default

Since no one has responded yet ...

From the .NET Framework Class Library in MSDN:

The maximum allowed uploaded file size is 8MB by default. Maximum file size can be specified in the machine.config or Web.config configuration files in the maxRequestLength attribute of the <httpRuntime> Element element. The maximum file size for a specific page can be specified using the <location> Element element in a Web.config file.

Is it possible you have a limitation set on your server(s) that you don't know about?

KABay
 
Old December 4th, 2003, 05:09 AM
Authorized User
 
Join Date: Jun 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the advice. The problem is cured now by an addition to the web.config specifying filesize to 10 Mb in my case
<httpRuntime maxRequestLength = 10000 />

best

Grahame

Best wishes,
Grahame

Grahame Hambleton
Webmaster / Developer
Saïd Business School
University of Oxford
Saïd Business School
Park End Street
Oxford OX1 1HP
Tel: +44 (0) 1865 288863
Fax: +44 (0) 1865 288805
email: [email protected]
http://www.sbs.ox.ac.uk





Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading large files ravichandrae Pro Java 1 January 11th, 2008 04:42 AM
Error while uploading large image file webnet ASP.NET 2.0 Basics 1 November 12th, 2007 09:32 AM
Strategies for large XML files asearle XSLT 7 September 28th, 2006 02:38 AM
Uploading Large Files to a Doc Lib viccoleman SharePoint Admin 1 May 15th, 2006 01:13 PM
Validate xml files present in subfolders ShaileshShinde General .NET 0 October 21st, 2005 11:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.