简体   繁体   中英

Post Upload File aborting

i'm having a problem with a file post i hope you can help me.

Here is the problem:

I have a *.aspx page that contains a form, that form is described here:

<form id="formUpload" name="formUpload" method="post" enctype="multipart/form-data" action="upload.aspx" target="iframex">

This upload.aspx page get the file do a lot of stuff and is supposed to register a startup script with a variable (errorFlag) that i use in upload.aspx after everything is executed:

$(document).ready(function () {

        if (errorFlag) { //*** C# gives me this variable
            self.parent.$("#iframex").show();
            self.parent.upload(false);
        }
        else {
            self.parent.upload(true);                
        }
    });

The problem is that i debugged every server code and everything is working fine, after there is no c# code to execute anymore (even after the unload) it just don't "come back" to render the HTML and after sometime it aborts the post.

Another problem is that it just occurs when i'm executing it on server, local works ok.

Thanks in advance, sorry if i couldn't be more clear.. is hard even to explain.

If it works locally and not on production then the issue could be as simple as your max file size for upload. Iis will limit the file upload to 4mb be default. You need to change this in the web.config under system.webserver maxAllowedContentLength and also system.web maxrequestlength.

you might find that iis is simply abandoning your upload.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM