Click here to Skip to main content
14,365,424 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello. Good Day.

I am new to C#.
I would like to upload a very large file to our server using C#.
Is there any way on I can break down into pieces (my file to be uploaded) then make into one when all of the pieces are already uploaded? It is because of the connection when sending large files.

Or how can I possibly do it uploading large file and the connection is limited only using C#?

Please Help.
Thank you.
Zoltán Zörgő 3-Jul-13 1:41am
It depends. But do we speak about http traffic or other kind of "upload"? Is on the client a bare web browser or a thicker clinet? If a web browser, is it HTML5 (websocket) enabled?
chimcham 3-Jul-13 1:46am
Let's say I'll be uploading an Excel file with the size of 40MB. As I upload it, there's a tendency that the connection will be lost.
Zoltán Zörgő 3-Jul-13 1:54am
But how? What are the technologies around? Please answer to my questions!
Zoltán Zörgő 3-Jul-13 2:21am
If IIS is involved, there is a request limit and an execution timeout too. Both can lead to connection break.
chimcham 3-Jul-13 2:28am
Yes, there is a limit.
Zoltán Zörgő 3-Jul-13 5:15am
(Please respond to the comment, so the other party could be informed.)
And how should I understand your latest comment? I know there is a limit. So if you don't want to give us the necessary details, don't expect any reasonable answer either.
chimcham 7-Jul-13 23:44pm
I'm using http connection to upload files to an ftp server. How will I do it using windows form? I mean, how can I upload large files across the server given that there are some limit?
Zoltán Zörgő 8-Jul-13 5:22am
You could control segmented upload from a browser with html5 or a silverlight/java/flash "applet". With a forms application you have direct control. http itself has no limitation, but the web server has. So you either take more control over the web server that is handling the uploads - like making your own service that is handling just the uploads, or you try to live with IIS's limitations and take the segmented way.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

i think its better do that requirement with wcf service,

convert that file into byte array, pass it to wcf service , in wcf write code to store in db,

for low connection means need to optimize the code to get better performance

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100