We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

UploadProgress is not working

Thread ID:

Created:

Updated:

Platform:

Replies:

55665 Feb 2,2007 11:51 AM UTC Apr 12,2007 04:02 PM UTC ASP.NET Web Forms (Classic) 5
loading
Tags: Tools
Ramesh
Asked On February 2, 2007 11:51 AM UTC

Hi,

I am using UploadProgress with Uploadbox. The file uploading but the Progress Bar displaying error: the Error is "HTTP Error 400 - Bad Request". What could be the reason, can you help me out?
Most probably this error occurs if the Content Length header of Zero in the HTTP request. How to resolve this issue? Correct if I am wrong?
I am using Sync Ver: 4.4.0.51 and VS2005, IIS5.1

Cheers,
Ramesh T

Administrator [Syncfusion]
Replied On February 2, 2007 12:58 PM UTC

Hi Ramesh,

Attached is the sample which helps you to upload files using UploadBox and UploadProgress controls.

http://www.syncfusion.com/Support/user/uploads/FileUpload_7889058b.zip

To work with the UploadBox and UploadProgress you should add the below specified in your web.config file.

$httpModules>
$add name="UploadModule" type="Syncfusion.Web.UI.WebControls.Tools.UploadControl.UploadModule,Syncfusion.Tools.Web, Version=4.402.0.51, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/>
$/httpModules>

In the attached sample you could find these lines of code kindly place these lines in your web.config, which resolves your problem.

Please let us know if you have any other concerns.

Regards,
Valli.

Ramesh
Replied On February 2, 2007 01:59 PM UTC

Hi Valli,

I added these lines of code in Web.Config file. It's uploading the data with-out any problem. But the UploadProgress is displaying this error. PFA is the screen-shot of the error.

Cheers
Ramesh T

UploadProgress-ErrorSccreenshot.zip

Administrator [Syncfusion]
Replied On February 6, 2007 11:33 AM UTC

Hi Ramesh,

Sorry for the delay in responding you.

We are not able to reproduce the issue 'HTTP Error 400 - Bad Request'. Please could you provide us more details to reproduce this issue at our end. For this you have to turn off the friendly error messages, so that we can see the real error. To do so

1.Select 'Tools' from the Internet Explorer menu and then select 'Internet Options'.
2.When the 'Internet Options' dialogue box opens click the 'Advanced' tab and scroll down to 'Show Friendly HTTP error messages'. Unclick the checkbox. Then click 'Apply'.

You could now get the real issue causing the problem, could you attach that corresponding screenshot.

Thanks for your patience.

Regards,
Valli.

Jack Lavallet
Replied On April 10, 2007 10:14 PM UTC

Valli, I am also getting this error with the 5.0 beta. Do you have a solution? Also, the ExtensionsAllow property seems to have no effect.

The UploadProgress when set to Inline shows:



Bad Request




Server Error in '/FormsFullCirclePrototype' Application.



HTTP Error 400 - Bad Request.






Version Information: ASP.NET Development Server 8.0.0.0






Here is my code:

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="AttachFiles.aspx.cs" Inherits="AttachFiles" Title="FormsFullCircle - Attach Files" %>

<%@ Register Assembly="Syncfusion.Tools.Web, Version=5.102.0.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"
Namespace="Syncfusion.Web.UI.WebControls.Tools" TagPrefix="cc1" %>




















And my codebehind:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Syncfusion.Web.UI.WebControls.Tools;
using Syncfusion.Web.UI.WebControls.Tools.UploadControl;

public partial class AttachFiles : System.Web.UI.Page
{
private ArrayList _listOfUploadedFilenames;

protected void Page_Load(object sender, EventArgs e)
{
if (ViewState["UploadedFilenames"] == null)
{
_listOfUploadedFilenames = new ArrayList();
}
else
{
_listOfUploadedFilenames = (ArrayList)ViewState["UploadedFilenames"];
}

//if (!Page.IsPostBack)
//{
//string stringAllowedExtensions = "pdf;txt;rtf;doc;xls;jpg;tif";
//UploadBox1.ExtensionsAllow = stringAllowedExtensions;
//UploadBox2.ExtensionsAllow = stringAllowedExtensions;
//UploadBox3.ExtensionsAllow = stringAllowedExtensions;
//UploadBox4.ExtensionsAllow = stringAllowedExtensions;
//UploadBox5.ExtensionsAllow = stringAllowedExtensions;

string stringSessionFolderPath = (string)Session["SessionFolderPath"];
UploadBox1.UploadFolder = stringSessionFolderPath;
UploadBox2.UploadFolder = stringSessionFolderPath;
UploadBox3.UploadFolder = stringSessionFolderPath;
UploadBox4.UploadFolder = stringSessionFolderPath;
UploadBox5.UploadFolder = stringSessionFolderPath;
//}
}

//protected void FileUploaded(object sender, EventArgs e)
//{
// Label2.Text += ((UploadBox)sender).FileName + " successfully uploaded. ";
//}

protected void UploadButton_Click(object sender, EventArgs e)
{
string stringFilenames = string.Empty;
if ((this.UploadBox1.IsUploaded))
{
stringFilenames = stringFilenames + this.UploadBox1.FileName + ", ";
RenameAndTrackUploadedFiles(this.UploadBox1.File);
}
if ((this.UploadBox2.IsUploaded))
{
stringFilenames = stringFilenames + this.UploadBox2.FileName + ", ";
RenameAndTrackUploadedFiles(this.UploadBox2.File);
}
if ((this.UploadBox3.IsUploaded))
{
stringFilenames = stringFilenames + this.UploadBox3.FileName + ", ";
RenameAndTrackUploadedFiles(this.UploadBox3.File);
}
if ((this.UploadBox4.IsUploaded))
{
stringFilenames = stringFilenames + this.UploadBox4.FileName + ", ";
RenameAndTrackUploadedFiles(this.UploadBox4.File);
}
if ((this.UploadBox5.IsUploaded))
{
stringFilenames = stringFilenames + this.UploadBox5.FileName;
RenameAndTrackUploadedFiles(this.UploadBox5.File);
}
if (stringFilenames != string.Empty)
{
Label2.Text = "Uploaded: " + stringFilenames;
}
}

private void RenameAndTrackUploadedFiles(UploadFile uploadFile)
{
string stringSessionFolderPath = (string)Session["SessionFolderPath"];
string stringNewFilename = stringSessionFolderPath + "\\" + Guid.NewGuid().ToString() + uploadFile.File.Extension;
uploadFile.MoveTo(stringNewFilename, true);
_listOfUploadedFilenames.Add(stringNewFilename);
}

protected void SkipButton_Click(object sender, EventArgs e)
{
Label2.Text = "Skipped";
}

protected void ContinueButton_Click(object sender, EventArgs e)
{
Label2.Text = "Continued";
}
}

Gokul B [Syncfusion]
Replied On April 12, 2007 04:02 PM UTC

Hi Jack,

We can able to reproduce the issue as you mentioned. We noticed that, when we set the Inline property of the UploadProgress throws "Http 404" error.

We confirm this a bug. Could you please open a Direct-Trac incident with the subject as forum id to proceed towards bug fix.

Let us know if you have any other queries.

Regards,
Gokulkumar B


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;