We have been using version 2010.3.1109.35 since 2010-11-11 without problems, upgraded to version 2010.3.1215.35 on 2010-12-25. The RadAsyncUpload is now failing to deserialize our custom AsyncUploadConfiguration properties.
Sample code below.
ASPX page with the RadAsyncUpload control:
Custom Configuration:
Initializing configuration in code behind of ASPX page with RadAsyncUpload control
Code behind of Http handler, our additional properties (UserName, FileNoteID) are not being deserialized here anymore.
Can someone please let me know how to resolve this issue? Do we need to change something in our web.config?
Thanks
Sample code below.
ASPX page with the RadAsyncUpload control:
<telerik:RadAsyncUpload runat="server" ID="FilesToUpload" MultipleFileSelection="Automatic" HttpHandlerUrl="~/Tracking/FileUpload.ashx" AutoAddFileInputs="true" />Custom Configuration:
public class CustomConfiguration : AsyncUploadConfiguration{ public string UserName { get; set; } public long FileNoteID { get; set; } public bool SaveContentOnly { get; set; }}Initializing configuration in code behind of ASPX page with RadAsyncUpload control
public partial class UploadFiles{ protected override void OnInit(EventArgs e) { base.OnInit(e);CustomConfiguration config = FilesToUpload.CreateDefaultUploadConfiguration<CustomConfiguration>(); config.FileNoteID = 1234; // sample ID config.UserName = "michael"; // sample user name config.SaveContentOnly = true; FilesToUpload.UploadConfiguration = config; }}Code behind of Http handler, our additional properties (UserName, FileNoteID) are not being deserialized here anymore.
public class FileUpload : AsyncUploadHandler{ protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName) { CustomConfiguration config = configuration as CustomConfiguration; if (config != null) { // UserName & FileNoteID come through as "" and 0 with latest release. DoSomething(config.UserName, Config.FileNoteID); } }}Can someone please let me know how to resolve this issue? Do we need to change something in our web.config?
Thanks