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

5 posts, 0 answers
  1. Pavel
    Pavel avatar
    3 posts
    Member since:
    Dec 2018

    Posted 04 Dec 2018 Link to this post

    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.


  2. Kammen
    Admin
    Kammen avatar
    369 posts

    Posted 05 Dec 2018 Link to this post

    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
  3. Pavel
    Pavel avatar
    3 posts
    Member since:
    Dec 2018

    Posted 06 Dec 2018 Link to this post

    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)

  4. Pavel
    Pavel avatar
    3 posts
    Member since:
    Dec 2018

    Posted 06 Dec 2018 Link to this post

    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)

  5. David
    David avatar
    125 posts
    Member since:
    Jan 2011

    Posted 06 Dec 2018 in reply to Pavel Link to this post

    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.

     

     

     

Back to Top