Could not find a part of the path when copy to file system

hadi tag asked on May 27, 2015 06:17

hi, i set Store files in file system for my web application and set "AttachmentFiles" for Files folder name. but when i press copy to file system button in system application, in event log create new row and not copy the attachment .

exception is contain :

Message: Exception has been thrown by the target of an invocation.

Exception type: System.Reflection.TargetInvocationException Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at CMS.IO.StorageProvider.GetFileStream(String path, FileMode mode) at CMS.IO.StorageHelper.SaveBinaryDataToDisk(String filePath, Byte[] fileData) at CMS.DocumentEngine.AttachmentInfoProvider.SaveFileToDiskInternal(String siteName, String guid, String fileName, String fileExtension, BinaryData fileData, Boolean deleteOldFiles, Boolean synchronization) at CMS.DocumentEngine.AttachmentInfoProvider.SaveFileToDisk(String siteName, String guid, String fileName, String fileExtension, BinaryData fileData, Boolean deleteOldFiles, Boolean synchronization) at CMS.DocumentEngine.AttachmentInfoProvider.EnsurePhysicalFileInternal(AttachmentInfo atInfo, String siteName)

Message: Could not find a part of the path 'C:\inetpub\wwwroot\shdoc\AttachmentFiles\shDocSite\b5\b5ec48a8-1108-4296-ba2f-d3b3feae2341.application\pdf'.

Exception type: System.IO.DirectoryNotFoundException Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at 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, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at CMS.FileSystemStorage.FileStream..ctor(String path, FileMode mode)

how to resolve this problem??

Recent Answers


Dawid Jachnik answered on May 27, 2015 13:38

Hello Hadi,

Do you have "AttachmentFiles" folder created in your file system of website ?

2 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.