ASP. NET upload progress metric-update 04/16)

Source: Internet
Author: User

The following are the zookeeper devices on ASP. NET.

 

1. uploadframehelper provides the getpreviouspage function to obtain cross-page PostBack
As follows:

<% @ Webhandler Language = "C #" class = "handler" %>

Using system;
Using system. Web;
Using system. reflection;
Using system. Security. permissions;
Using system. IO;
Using system. Web. UI;

Public class handler: ihttphandler {

Public void processrequest (httpcontext context ){
If (uploadframehelper. handleupload ())
{
// The stored statement is stored here.
// Ie:
// Context. Request. Files [0]. saveas (@ "C:/temp1/upload. XXX ");
Page P = uploadframehelper. getpreviouspage ();
System. Web. UI. webcontrols. fileupload FL = (system. Web. UI. webcontrols. fileupload) p. findcontrol ("fileupload1 ");
Fl. saveas (@ "C:/uploadfile" + FL. filename );
Context. response. Write (context. Request. Files [0]. filename );
}
}
 
Public bool isreusable {
Get {
Return false;
}
}

}

2. In fact, this mechanism is not limited to the setting of maxrequestlength,
The limit is derived from the program running below.

Hackupload. CS

..........
Public bool load ()
{
If (_ context. Request. contentlength <getmaxrequestsize ())
{
..........

If you remove this program, there will be no restrictions on the above cases. I guess it will be limited only to executiontimeout and
Io, probably 2 GB or 4 GB.

3. ASP. NET runtime memory consumption. In the memory, ASP. NET runtime first exists in the memory,

This means that there are a large number of cases above, and many people will use IIS to consume a lot of memory.

From the processing mechanism of ASP. NET runtime, I think there will be a way to solve this problem, but I have to wait for a while to have a good look.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.