Completed
Last Updated: 22 Dec 2023 11:33 by ADMIN
Ewin
Created on: 25 Apr 2014 14:21
Type: Feature Request
7
long file path exception handling
There are times where test studio throws this exception described in http://feedback.telerik.com/Project/161/Feedback/Details/121035-path-too-long-on-backup-problem

[04/24 11:48:37,Telerik.TestStudio.RemoteExecutor.exe(5092:133),TestStudio] AutomationHostState.StoreToFile() : EXCEPTION! (see below)
     Situation: AutomationHostState.StoreDomOnDisk
     Outer Exception Type: System.IO.PathTooLongException
     Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
     HRESULT: 0x800700CE (Official ID (if app.) = 2147942606, Error Bit = FAILED, Facility = FACILITY_WIN32, Code = ERROR_FILENAME_EXCED_RANGE)
     Call Stack:
          at System.IO.PathHelper.GetFullPathName()
          at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
          at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
          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)
          at ArtOfTest.WebAii.Design.AutomationHostState.StoreToFile(String filePath, Object value, String traceMethod)

[04/24 11:48:37,Telerik.TestStudio.RemoteExecutor.exe(5092:133),TestStudio] AutomationHostState.StoreImageBytesOnDisk() : EXCEPTION! (see below)
     Situation: AutomationHostState.StoreImageBytesOnDisk
     Outer Exception Type: System.IO.PathTooLongException
     Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
     HRESULT: 0x800700CE (Official ID (if app.) = 2147942606, Error Bit = FAILED, Facility = FACILITY_WIN32, Code = ERROR_FILENAME_EXCED_RANGE)
     Call Stack:
          at System.IO.PathHelper.GetFullPathName()
          at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
          at System.IO.Path.GetFullPathInternal(String path)
          at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
          at ArtOfTest.WebAii.Design.AutomationHostState.StoreImageBytesOnDisk(String projectResultsPath, String fileRelativePath, String expectedImageRelativePath)

There was a MSDN blog by Kim Hamilton that suggested a possible solution to this issue.  http://blogs.msdn.com/b/bclteam/archive/2008/07/07/long-paths-in-net-part-3-of-3-redux-kim-hamilton.aspx

Please see if this exception handling is feasible.
5 comments
Tom
Posted on: 20 May 2020 07:28
I would suggest to use Long Path Tool program. It resolves problem regarding source path too long.
FredDavis
Posted on: 11 Apr 2020 12:21
Long path tool was always there for me in this type of problem. I've been using it for months now and it is really helpful
ADMIN
Konstantin Petkov
Posted on: 30 Oct 2015 15:14
It worth's giving this Windows hotfix a go:
https://support.microsoft.com/en-us/kb/2891362
joshua
Posted on: 25 Oct 2015 04:16
I would recommend in this case to try program Long Path Tool
Ewin
Posted on: 25 Apr 2014 14:26
http://msdn.microsoft.com/en-us/library/aa365247.aspx