Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using My.Computer.Network.UploadFile() method to upload a movie file.

I am using IIS as webserver and Oracle as the data base.

With the above function I can upload a file of 2.5MB video file successfully.

But if I tried to upload a file of 25MB(Windows sample video file) I am getting exception as
Remote server returned an error (500) Internal Server Error.

I confirmed that there is no Authentication problem. Also no connection timeout problem(As I am using 100sec default time out).

Could you let me know the reason for the error.

Is it because of the size problem?

If so what is the max size limit which I can upload?
Posted
Updated 14-Mar-12 21:42pm
v2

1 solution

I have found the answer.

The maximum size for the Computer.network.Uploadfile() is defined in 2 places.

1. web.config file.
Parameter is maxRequestLength.

By default maxRequestLength is 10 MB.

I increased it to 30 MB and sucessfully uploaded 20 MB video file.


2. In IIS there is request filter.

Set the maximum allowed size to required size.



web.config also has timeout parameter. By default it is 2 mins.


Regards,

Vijay
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900