Click here to Skip to main content
16,021,125 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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)

{

C#
//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.
Posted

1 solution

It is quicker locally, by definition. It's slower across the internet, where your connection speed is the issue.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900