469,928 Members | 1,861 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,928 developers. It's quick & easy.

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 4595
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Tim Frawley | last post: by
6 posts views Thread by Bruno Piovan | last post: by
2 posts views Thread by Mike Kober | last post: by
Jacotheron
6 posts views Thread by Jacotheron | last post: by
10 posts views Thread by Devang | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.