简体   繁体   中英

Seeing the error with ajaxcontroltoolkit ajaxfileupload data import and update panel for ASP.NET 4.0

The upload and data import functions correctly on the development server, but gets stuck on the "file uploaded" status on the production server. The correct result is to run some code after the file has been uploaded to the server and then display "The files(s) have been uploaded." in a separate green label. I am currently using the following code to display certain errors for the code for the data import to the database, but it does not display why the data import gets stuck on the "file uploaded" status. I think I have isolated where the data import code stops executing, but again, the code should be correct because it functions correctly on the development server. Is there another way for me to see the error or why the data import code is not being executed?

    if (_errMsg != string.Empty)
    {
        successLabel.Visible = false;
        string script = "<script type=\"text/javascript\">alert('" + _errMsg + "');</script>";
        Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", script, false);
    }
    else
    {
        successLabel.Visible = true;
    }

UPDATE

The point at where the data import code stops functioning is related to the following function where the

MainTableChangesUpdateRecord(cwtsData, modifiedBy, Convert.ToInt16(cwtsData[0])).ToString()

您可以将代码放在try catch块中,但是我怀疑在生产服务器上,您对文件可以上传到的位置有一些限制,即,当驱动器没有对文件的写权限时,尝试将其保存到“ C”驱动器根目录。

There ended up being an issue with the database itself such as the database being corrupted and not an issue with the code. The database was restored to a previous version and everything executed correctly.

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