After setting everything on my dev server, it worked fine
but when uploading it on the prod server, I received the following message after clicking the "Submit" button;
My question is; what are the access right requirements for RadUpload to work?
As in an intranet environment, we setted up a generic account for this IIS application with Full rights on this folder but I suspect maybe something with the rights, any hint?
5 Answers, 1 is accepted
The exception suggests that the path is invalid. Please check if all the folders do exist and the account under which ASP.NET operates can write there.
the Telerik team
I am also facing this issue. I am using RadUpload for uploading file. Its working great on my PC. its also work great on Server.
But our one client having problem and got error.
Could not find a part of the path 'D:\Handbooks\Testing.pdf'
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Handbooks\Testing.pdf'.
Its happen only in Window 7 in some specific window. I have no idea.
I think this will help you.
Path is 100% correct and has full permission. Its work locally as well as on server. but one of our client get this error. i have no idea.
Can you help me in this? Please see latest images.
OR David did you find any solution about this. your help is really useful for me.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Testing\Test.pdf'.
[DirectoryNotFoundException: Could not find a part of the path 'D:\Testing\Test.pdf'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +216
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) +2481
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +229
We are not aware of such error to be caused by the default behavior of RadUpload and we have not been reported as well -so it should be some how caused by your additional custom code and functionality. I will recommend you to refer to this forum thread where general solutions for this issue have been provided.
the Telerik team
I got the solution of this issue, its only arise in IE on few particular computer. After uploading it again and again and checking on client computer. i figure out this.
This problem is arise due to this: When we getting UploadedFile name [ file.FileName.ToString() ]
So need to use this
file.GetNameWithoutExtension() + file.GetExtension();
instead of file.FileName.ToString();
string targetFolder = System.Web.HttpContext.Current.Server.MapPath(@"~/TestUpload");
string file1 = file.GetNameWithoutExtension() + file.GetExtension();
string targetFileName = System.IO.Path.Combine(targetFolder, file1);
if you are using file.FileName.ToString() then replace it with file.GetNameWithoutExtension() + file.GetExtension();