简体   繁体   English

使用ASP.NET 4.0的ajaxcontroltoolkit查看错误ajaxfileupload数据导入和更新面板

[英]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() MainTableChangesUpdateRecord(cwtsData,ModifyBy,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. 数据库已还原到以前的版本,并且一切正常执行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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