472,779 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

How to speed up file upload in 2.0

Hi. I've built a page using standard ASP.NET 2.0 features and when I upload a
large file (>20MB) to our intranet server, I get a paltry 100KB/s on our
100Mb/s LAN. Simply copying the file, I get around 7MB/s.

I'm using a FileUpload control on an .aspx page, and then I'm writing the
MyFileUpload.PostedFile.InputStream off to a database.

What can I do to speed up this uploading?

Thanks in advance
Dec 30 '05 #1
3 4902
Hi Mike,

Welcome to ASPNET newsgroup.
As for the file uploading performance issue, based on my experience,
programmtaically file uploading do have much more performance overhead than
directly network data transmitting (like file share copy...). It is due to
both of the http and programming interface( asp or asp.net ....)....
Also, to make sure the asp.net code dosn't hit performance too much, I
suggest you try using the IIS WebDav(http) API to upload the file (which
also go through HTTp) to see whether the speed differs much from the
asp.net web page uploading....

In addition, since you mentioned that your application is hosted in a local
intranet environment, you can also consider using some rich client
component to do the file uploading, e.g: ActiveX component or IE hosted
..net Usercontrol... They can use socket component to tranmit file directly
over TCP/IP instead the http form data format.....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: How to speed up file upload in 2.0
| thread-index: AcYNQRXNVVaRjnYRQwa1ZBxS5Ba5Cg==
| X-WBNR-Posting-Host: 198.54.202.242
| From: "=?Utf-8?B?TWlrZSBLZWxseQ==?=" <Mi*******@community.nospam>
| Subject: How to speed up file upload in 2.0
| Date: Fri, 30 Dec 2005 05:01:01 -0800
| Lines: 10
| Message-ID: <8F**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367709
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi. I've built a page using standard ASP.NET 2.0 features and when I
upload a
| large file (>20MB) to our intranet server, I get a paltry 100KB/s on our
| 100Mb/s LAN. Simply copying the file, I get around 7MB/s.
|
| I'm using a FileUpload control on an .aspx page, and then I'm writing the
| MyFileUpload.PostedFile.InputStream off to a database.
|
| What can I do to speed up this uploading?
|
| Thanks in advance
|

Jan 3 '06 #2
Thanks, Steven.

Can you point me to some "getting started" guide for using WebDav, please?
I'm new to it.

Although I mentioned the intranet, we intend using the site over the
Internet, but since upload speeds are so awful, we're restricting it to
intranet for now.

PS. Someone mentioned coding my own HttpModule. Would that make a marked
improvement, you think?
"Steven Cheng[MSFT]" wrote:
Hi Mike,

Welcome to ASPNET newsgroup.
As for the file uploading performance issue, based on my experience,
programmtaically file uploading do have much more performance overhead than
directly network data transmitting (like file share copy...). It is due to
both of the http and programming interface( asp or asp.net ....)....
Also, to make sure the asp.net code dosn't hit performance too much, I
suggest you try using the IIS WebDav(http) API to upload the file (which
also go through HTTp) to see whether the speed differs much from the
asp.net web page uploading....

In addition, since you mentioned that your application is hosted in a local
intranet environment, you can also consider using some rich client
component to do the file uploading, e.g: ActiveX component or IE hosted
.net Usercontrol... They can use socket component to tranmit file directly
over TCP/IP instead the http form data format.....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: How to speed up file upload in 2.0
| thread-index: AcYNQRXNVVaRjnYRQwa1ZBxS5Ba5Cg==
| X-WBNR-Posting-Host: 198.54.202.242
| From: "=?Utf-8?B?TWlrZSBLZWxseQ==?=" <Mi*******@community.nospam>
| Subject: How to speed up file upload in 2.0
| Date: Fri, 30 Dec 2005 05:01:01 -0800
| Lines: 10
| Message-ID: <8F**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367709
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi. I've built a page using standard ASP.NET 2.0 features and when I
upload a
| large file (>20MB) to our intranet server, I get a paltry 100KB/s on our
| 100Mb/s LAN. Simply copying the file, I get around 7MB/s.
|
| I'm using a FileUpload control on an .aspx page, and then I'm writing the
| MyFileUpload.PostedFile.InputStream off to a database.
|
| What can I do to speed up this uploading?
|
| Thanks in advance
|

Jan 3 '06 #3
Thanks for your response Mike,

WebDav is a public standard file/data transfering protocol over HTTP,
Microsoft's exchange server first implement it and IIS server also provide
support on it:

#Using WebDAV with IIS
http://www.windowsnetworking.com/art...ebDAV-IIS.html

#About WebDAV (IIS 6.0)
http://www.microsoft.com/technet/pro.../Library/IIS/8
44f5e01-4b9e-4dac-897e-2a0bb33f28af.mspx

Also, as for the following things you mentioned,
====================
PS. Someone mentioned coding my own HttpModule. Would that make a marked
improvement, you think?
===================

I think HttpModule will be a bit better because httpmodule process the
request at the begining of ASP.NET serverside pipeline so that it'll cause
less overhead than an asp.net httphandler or page handler....

In addition, generally speaking, for uploading file over HTTP protocol to
IIS webserver, using the raw ISAPI filter will be the best choice from
performance perspective...... Here are some related articles discussing
on creating file upload ISAPI component:

http://www.codeguru.com/Cpp/I-N/isap...cle.php/c4487/

http://msdn.microsoft.com/msdnmag/issues/01/10/Upload/

Hope also helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: How to speed up file upload in 2.0
| thread-index: AcYQbAmYdL0dtsVhTm2FHlDmpPjuNQ==
| X-WBNR-Posting-Host: 196.25.255.242
| From: "=?Utf-8?B?TWlrZSBLZWxseQ==?=" <Mi*******@community.nospam>
| References: <8F**********************************@microsoft.co m>
<75**************@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: How to speed up file upload in 2.0
| Date: Tue, 3 Jan 2006 05:46:03 -0800
| Lines: 82
| Message-ID: <7F**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:368246
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks, Steven.
|
| Can you point me to some "getting started" guide for using WebDav,
please?
| I'm new to it.
|
| Although I mentioned the intranet, we intend using the site over the
| Internet, but since upload speeds are so awful, we're restricting it to
| intranet for now.
|
| PS. Someone mentioned coding my own HttpModule. Would that make a marked
| improvement, you think?
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Mike,
| >
| > Welcome to ASPNET newsgroup.
| > As for the file uploading performance issue, based on my experience,
| > programmtaically file uploading do have much more performance overhead
than
| > directly network data transmitting (like file share copy...). It is due
to
| > both of the http and programming interface( asp or asp.net ....)....
| > Also, to make sure the asp.net code dosn't hit performance too much, I
| > suggest you try using the IIS WebDav(http) API to upload the file
(which
| > also go through HTTp) to see whether the speed differs much from the
| > asp.net web page uploading....
| >
| > In addition, since you mentioned that your application is hosted in a
local
| > intranet environment, you can also consider using some rich client
| > component to do the file uploading, e.g: ActiveX component or IE
hosted
| > .net Usercontrol... They can use socket component to tranmit file
directly
| > over TCP/IP instead the http form data format.....
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | Thread-Topic: How to speed up file upload in 2.0
| > | thread-index: AcYNQRXNVVaRjnYRQwa1ZBxS5Ba5Cg==
| > | X-WBNR-Posting-Host: 198.54.202.242
| > | From: "=?Utf-8?B?TWlrZSBLZWxseQ==?=" <Mi*******@community.nospam>
| > | Subject: How to speed up file upload in 2.0
| > | Date: Fri, 30 Dec 2005 05:01:01 -0800
| > | Lines: 10
| > | Message-ID: <8F**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:367709
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Hi. I've built a page using standard ASP.NET 2.0 features and when I
| > upload a
| > | large file (>20MB) to our intranet server, I get a paltry 100KB/s on
our
| > | 100Mb/s LAN. Simply copying the file, I get around 7MB/s.
| > |
| > | I'm using a FileUpload control on an .aspx page, and then I'm writing
the
| > | MyFileUpload.PostedFile.InputStream off to a database.
| > |
| > | What can I do to speed up this uploading?
| > |
| > | Thanks in advance
| > |
| >
| >
|

Jan 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
1
by: Tim Frawley | last post by:
I am using the code example listed on Microsofts web page at: http://support.microsoft.com/default.aspx?scid=kb;EN-US;323245 I noticed after testing that my IE 6.0.2800 is taking anywhere from 1...
6
by: Bruno Piovan | last post by:
Hello, does anyone know how can I measure the upload speed with asp.net?? I would like to have button on a form and when the user clicks this button, it will show what is the upload speed. ...
2
by: Mike Kober | last post by:
I am having issues with the File Upload control for sending files to the server via HTTP. The speed of the upload is often between 20kbs and 40kbs. If I use the LAN at work to the server, it...
4
by: halimunan | last post by:
Hello all, I have a question, how do i measure the download/upload speed... as if download rate, upload rate or kbps transfer rate. i want to do my own windows application using C# to measure the...
6
Jacotheron
by: Jacotheron | last post by:
I need a PHP script that can upload music files (mp3). The script is for a home project I have started a while ago. I have a MySQL database of all the music that I have. Other computers on the...
10
by: Devang | last post by:
Hello, I am using php script to upload file. some times if file size is too big(1GB) it takes too much time to upload. Can someone suggest me the way to increase upload speed. thanks
2
dlite922
by: dlite922 | last post by:
I have an intranet LAMP server and I use PHP to upload files. It is of course faster to download the same file than to upload it. I understand ISPs throttle their network for download speed, than...
4
by: nestle | last post by:
I have DSL with a download speed of 32MB/s and an upload speed of 8MB/s(according to my ISP), and I am using a router. My upload speed is always between 8MB/s and 9MB/s(which is above the max upload...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.