How to speed up file upload in 2.0

G

Guest

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
 
S

Steven Cheng[MSFT]

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==?=" <[email protected]>
| Subject: How to speed up file upload in 2.0
| Date: Fri, 30 Dec 2005 05:01:01 -0800
| Lines: 10
| Message-ID: <[email protected]>
| 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!TK2MSFTNGXA03.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
|
 
G

Guest

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?
 
S

Steven Cheng[MSFT]

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/articles_tutorials/WebDAV-IIS.html

#About WebDAV (IIS 6.0)
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/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/isapi/article.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==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: How to speed up file upload in 2.0
| Date: Tue, 3 Jan 2006 05:46:03 -0800
| Lines: 82
| Message-ID: <[email protected]>
| 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!TK2MSFTNGXA03.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==?=" <[email protected]>
| > | Subject: How to speed up file upload in 2.0
| > | Date: Fri, 30 Dec 2005 05:01:01 -0800
| > | Lines: 10
| > | Message-ID: <[email protected]>
| > | 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!TK2MSFTNGXA03.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
| > |
| >
| >
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top