This is a migrated thread and some comments may be shown as answers.

AsyncUpload Locking files

3 Answers 57 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 23 Jul 2013, 07:16 PM
try
            {
                string packageName = SSISPackages.SelectedItem.Text.Replace(" ", "_");
                string packageDesc = SSISPackages.SelectedItem.Text;                
                foreach (UploadedFile f in UploadFile.UploadedFiles)
                {
                    f.SaveAs(AdministartiveToolManager.GetPackageLocation(packageName) + AdministartiveToolManager.GetFileName(packageDesc), true);
                }
                
            }
          
My file is Lock after i ran the above code.... 

3 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 26 Jul 2013, 01:46 PM
Hi Matthew,

Could you provide us with more information about your scenario? When do you execute this code? Usually the uploaded file is locked in cases, where it is being opened by another process or if the uploading is not finished.

Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Matthew
Top achievements
Rank 1
answered on 28 Jul 2013, 09:26 PM
Hi Hristo
Its called on the postback triggered by a button. using the asyncUpload to tranasfer file through the UI, which is processed by another application. Its locked before the application picks it up. Is there any way of ensuring the file is always unlocked.
0
Hristo Valyavicharski
Telerik team
answered on 31 Jul 2013, 01:49 PM
Hi Matthew,

If the file is not being opened by the other application it shouldn't be locked. Please open a support ticket and attach a runnable sample with steps to reproduce, so we could look and debug your code.

Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
AsyncUpload
Asked by
Matthew
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or