更新文档时出现缓冲错误 [英] Buffering error when uplaod documents

查看:95
本文介绍了更新文档时出现缓冲错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在上载文档时,它已在本地计算机上正确上载,但是当我在服务器端检查相同功能时,首先上载文档&单击添加按钮时,它将缓冲很长时间.我检查了错误日志文件,因为它在此行上生成了错误
受保护的void ErrorMsg_ServerValidate(对象源,ServerValidateEventArgs args)

{

在服务器端检查时,

At the time of uploading Documents it uploaded properly at locally on machine but when i am checking it on server side same functionality first upload documents & Click on Add Button at the time it will buffer long time. i was checked error log file in that it was generated error on this line
protected void ErrorMsg_ServerValidate(object source, ServerValidateEventArgs args)

{

//on this line error occure when checking on server side
   string fileName = Functions.ToString(fileUpload.PostedFile.FileName);
        ErrorMsg.Text = "";
        if (fileUpload.Value != "")
        {
            pGotFile = true;
            pFileExt = GetExtension(fileUpload.PostedFile.FileName).ToLower();
            pFilePost = fileUpload.PostedFile;
            if (pFileExt == ".pdf")
            {
                Ind = true;
            }

            if (!Ind)
            {
                args.IsValid = false;
                ErrorMsg.Text = "The file format you specified is not supported";
               return;
            }

            if (fileUpload.PostedFile.ContentLength >= Functions.ToInt32(Config.Get("SplitterDocUploadValidationSize")))
            {
                args.IsValid = false;
                ErrorMsg.Text = Functions.ToString(Config.Get("SplitterDocUploadValidationMessage"));
                return;
            }
            if (string.IsNullOrEmpty(fileName))
            {
                fileName = System.IO.Path.GetFileName(fileUpload.PostedFile.FileName);
            }
            else
            {
                fileName = fileName + pFileExt;
            }

        }
        else
        {
            pGotFile = false;
            if (pRequired)
            {
                args.IsValid = false;
                ErrorMsg.Text = "Please select the document to upload";
            }
        }
    }




它在本地计算机上可以正常工作,但在服务器端却被缓冲了很长时间.




its work fine on local machine but on server side it was just buffered long time .
idea on that suggest.

推荐答案

根据定义,它在本地更快.在互联网上速度较慢,这是您连接速度的问题.
It is quicker locally, by definition. It''s slower across the internet, where your connection speed is the issue.


这篇关于更新文档时出现缓冲错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆