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

Unhandled Exception: System.IO.PathTooLongException: The specified path, file name, or both are too long...

5 Answers 1916 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 04 Dec 2018, 07:18 AM
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.PathTooLongException: 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.
   at System.IO.PathHelper.GetFullPathName()
   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.Path.GetFullPath(String path)
   at System.Windows.Forms.IntSecurity.UnsafeGetFullPath(String fileName)
   at System.Windows.Forms.IntSecurity.DemandFileIO(FileIOPermissionAccess access, String fileName)
   at System.Windows.Forms.FileDialog.get_FileName()
   at System.Windows.Forms.FileDialog.OnBeforeVistaDialog(IFileDialog dialog)
   at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr hWndOwner)
   at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner)
   at Fiddler.frmViewer.actSaveSessionArchive(IWin32Window wndOwner, Session[] arrSessions, String sSuggestedFilename) in C:\JenkinsHome\jobs\FiddlerReleaseBuild\workspace\Fiddler2\Viewer.cs:line 6393
   at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItem.MenuItemData.Execute()
   at System.Windows.Forms.Command.Invoke()
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at Fiddler.frmViewer.WndProc(Message& m) in C:\JenkinsHome\jobs\FiddlerReleaseBuild\workspace\Fiddler2\Viewer.cs:line 12337
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Fiddler
    Assembly Version: 5.0.20182.28034
    Win32 Version: 5.0.20182.28034
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Fiddler.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2046.0 built by: NET47REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2046.0 built by: NET47REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2612.0 built by: NET471REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Xceed.Zip.v5.4
    Assembly Version: 5.4.13572.13590
    Win32 Version: 5.4.13572.13590
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Xceed.Zip.v5.4.DLL
----------------------------------------
Xceed.Compression.Formats.v5.4
    Assembly Version: 5.4.13572.13590
    Win32 Version: 5.4.13572.13590
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Xceed.Compression.Formats.v5.4.DLL
----------------------------------------
Xceed.FileSystem.v5.4
    Assembly Version: 5.4.13572.13590
    Win32 Version: 5.4.13572.13590
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Xceed.FileSystem.v5.4.DLL
----------------------------------------
Xceed.Compression.v5.4
    Assembly Version: 5.4.13572.13590
    Win32 Version: 5.4.13572.13590
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Xceed.Compression.v5.4.DLL
----------------------------------------
Microsoft.mshtml
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.0.3300.0
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------
Fiddler.AtCacheInspectors
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Inspectors/Fiddler.AtCacheInspectors.dll
----------------------------------------
Standard
    Assembly Version: 2.6.2.0
    Win32 Version: 2.6.2.0
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Inspectors/Standard.DLL
----------------------------------------
SyntaxView
    Assembly Version: 2.6.2.0
    Win32 Version: 2.6.2.0
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Inspectors/SyntaxView.dll
----------------------------------------
FiddlerOrchestra.Addon
    Assembly Version: 1.0.20182.28033
    Win32 Version: 1.0.20182.28033
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Scripts/FiddlerOrchestra.Addon.dll
----------------------------------------
FiddlerOrchestra.Connection
    Assembly Version: 1.0.20182.28033
    Win32 Version: 1.0.20182.28033
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Scripts/FiddlerOrchestra.Connection.dll
----------------------------------------
netstandard
    Assembly Version: 2.0.0.0
    Win32 Version: 4.6.25908.2
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Scripts/netstandard.DLL
----------------------------------------
FiddlerOrchestra.Protocol
    Assembly Version: 1.0.20182.28033
    Win32 Version: 1.0.20182.28033
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Scripts/FiddlerOrchestra.Protocol.dll
----------------------------------------
FiddlerOrchestra.Utilities
    Assembly Version: 1.0.20182.28033
    Win32 Version: 1.0.20182.28033
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Scripts/FiddlerOrchestra.Utilities.dll
----------------------------------------
RulesTab2
    Assembly Version: 2.6.2.0
    Win32 Version: 2.6.2.0
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Scripts/RulesTab2.dll
----------------------------------------
SimpleFilter
    Assembly Version: 2.6.2.0
    Win32 Version: 2.6.2.0
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Scripts/SimpleFilter.dll
----------------------------------------
Timeline
    Assembly Version: 2.6.0.3
    Win32 Version: 2.6.0.3
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Scripts/Timeline.dll
----------------------------------------
Microsoft.JScript
    Assembly Version: 10.0.0.0
    Win32 Version: 14.7.2046.0 built by: NET47REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.JScript/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.JScript.dll
----------------------------------------
System.Windows
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2046.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Windows.dll
----------------------------------------
JScript Thunk Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 14.7.2046.0 built by: NET47REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.JScript/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.JScript.dll
----------------------------------------
KesKUZuK
    Assembly Version: 0.0.0.0
    Win32 Version: 14.7.2046.0 built by: NET47REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.JScript/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.JScript.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.7.2612.0 built by: NET471REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Security
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2650.0 built by: NET471REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
----------------------------------------
System.Net.Http
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2661.0 built by: NET471REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.7.2612.0 built by: NET471REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.2.21924
    CodeBase: file:///C:/Users/Pavel_Balinski1/AppData/Local/Programs/Fiddler/Newtonsoft.Json.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


5 Answers, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 05 Dec 2018, 01:24 PM
Hi,

This exception seems to be Windows related - the max Path cannot exceed 260 characters. It seems it's fixed in the latest Windows version, based on this blogpost. 

Can you share more information about the version of your windows and how exactly this happens? 

Regards,
Kammen
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pavel
Top achievements
Rank 1
answered on 06 Dec 2018, 07:51 AM

OS Name    Microsoft Windows 10 Enterprise
Version    10.0.15063 Build 15063

Exception pop-up when I try save session in folder with long path

After that I can't change folder and save in another (exception pop-up again)

0
Pavel
Top achievements
Rank 1
answered on 06 Dec 2018, 11:44 AM

OS Name    Microsoft Windows 10 Enterprise
Version    10.0.15063 Build 15063

Exception pop-up when I try save session in folder with long path

After that I can't change folder and save in another (exception pop-up again)

0
David
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 06 Dec 2018, 08:31 PM

The path to long error is a known bug in all flavors of Windows.  Your solutions are:  Map a drive letter further down the path so your overall path is less than 260 characters. There is a configuration setting you can set in c# to use long path names if you are using the correct flavor of .NET and windows.  By default .NET uses the short path names and thus you get the error.  (Compatibility reasons)

Sorry but the precise keyword eludes me.  I haven't had  to use it in 2 years.

 

 

 

0
FredDavis
Top achievements
Rank 1
answered on 16 Mar 2020, 04:51 AM
I suggest you try Long path tool is the very good program for easily delete, copy & rename long path files, error, unlock solution.
Try it and solve your problem.
I used long path tool and I solve my error, unlock problem solution.

Tags
General Discussions
Asked by
Pavel
Top achievements
Rank 1
Answers by
Kammen
Telerik team
Pavel
Top achievements
Rank 1
David
Top achievements
Rank 1
Iron
Veteran
Iron
FredDavis
Top achievements
Rank 1
Share this question
or