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

RadAsyncUpload Access to the path is denied when impersonating

3 Answers 299 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Chris Du
Top achievements
Rank 1
Chris Du asked on 14 Feb 2013, 07:43 PM
Background info: when user upload a file the file is save to a folder on a shared network drive. I'm using the RadAsyncUpload and I'm getting an error when i'm impersonating an acct that have access to the folder.

Error on this line :  FileUpload_File.UploadedFiles.Item(0).SaveAs(FullFilePathName)


Error Msg: Access to the path is denied

Stack: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.__Error.WinIOError() at System.IO.File.Move(String sourceFileName, String destFileName) at Telerik.Web.UI.AsyncUploadedFile.SaveAs(String fileName, Boolean overwrite) at Telerik.Web.UI.UploadedFile.SaveAs(String fileName) at xDefault.SaveFile()

I'm only getting this error when i'm impersonating

anyone have any idea why i'm having this issue?

3 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 19 Feb 2013, 06:12 PM
Hi Chris,

Are you getting something like this? Probably the impersonated user doesn't have write permissions to the folder on the shared network drive. You can use the following code: 
private string GetWindowsIdentity()
{
    return (System.Security.Principal.WindowsIdentity.GetCurrent().Name);
}
to get identity passed from IIS. For more details please take a look at this link.

In addition be sure that the ASP.NET Impersonation Authentication is Enabled and configured correctly.

All the best,
Hristo Valyavicharski
the Telerik team
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 their blog feed now.
0
Chris Du
Top achievements
Rank 1
answered on 20 Feb 2013, 03:20 PM
user acct  have full access to folder

i check the identity and it's correct

still having the issue
0
Hristo Valyavicharski
Telerik team
answered on 25 Feb 2013, 02:03 PM
Hi Chris,

Could you record a short video to see what permissions you give and to see how you configure the  Authentication in IIS? You can use this free software to create and share videos.

Regards,
Hristo Valyavicharski
the Telerik team
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 their blog feed now.
Tags
Upload (Obsolete)
Asked by
Chris Du
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Chris Du
Top achievements
Rank 1
Share this question
or