Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jason Prothero 414 posts 1222 karma points c-trib
    Aug 19, 2011 @ 23:49
    Jason Prothero
    0

    Long filenames causing errors in Courier 2

    I'm getting this error when trying to deploy using Courier 2 using the content tree:

    Any thoughts?

     

    Umbraco.Courier.Core.Exceptions.PackageException: Unable to package item '*REALLY LONG NAME*' from provider 'Documents' into filename '*REALLY LONG NAME*_1994' ---> 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.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)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
    at Umbraco.Courier.Core.Serialization.Serializer.SaveToFile(Byte[] bytes, String filePath)
    at Umbraco.Courier.Core.Serialization.Serializer.SerializeToFile(Object o, Type t, String filePath)
    at Umbraco.Courier.Core.PackagingManager.™(ItemIdentifier itemId, ItemProvider provider, ItemType itemType)
    --- End of inner exception stack trace ---
    at Umbraco.Courier.Core.PackagingManager.™(ItemIdentifier itemId, ItemProvider provider, ItemType itemType)
    at Umbraco.Courier.Core.PackagingManager.š()
    at Umbraco.Courier.Core.PackagingManager.PackageQueue()
    at Umbraco.Courier.UI.Dialogs.CommitItem.PackageSelectedItems()
    at Umbraco.Courier.UI.Dialogs.CommitItem.oneSteptransfer(Object sender, EventArgs e)
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    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.


    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.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)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
    at Umbraco.Courier.Core.Serialization.Serializer.SaveToFile(Byte[] bytes, String filePath)
    at Umbraco.Courier.Core.Serialization.Serializer.SerializeToFile(Object o, Type t, String filePath)
    at Umbraco.Courier.Core.PackagingManager.™(ItemIdentifier itemId, ItemProvider provider, ItemType itemType)

  • Brendan Rice 303 posts 466 karma points
    Aug 22, 2011 @ 18:56
    Brendan Rice
    0

    Did you get this sorted? I assume it has to do with the way Courier is naming the revision files/folders before it tries to send them to the server.

    Has anyone else seen this or know of a fix?

  • Jason Prothero 414 posts 1222 karma points c-trib
    Aug 22, 2011 @ 19:01
    Jason Prothero
    1

    My only fix some far is to rename the nodes to be smaller.  However, this isn't ideal when a client is using Courier and may not understand the error.  It would be nice to figure out a long term solution.

     

     

  • Brendan Rice 303 posts 466 karma points
    Aug 22, 2011 @ 19:12
    Brendan Rice
    0

    That kind of sucks as the way we have the node names set up some of them are always going to be quite long.

  • Donald St. Martin 83 posts 128 karma points
    Aug 22, 2011 @ 19:36
    Donald St. Martin
    0

    I had the same problem in the middle of last week.  My only solution was to rename the nodes to something shorter as well.  I agree it is annoying - has a bug report been filed?  I'd be glad to vote it up.

    --
    Donald 

  • Jason Prothero 414 posts 1222 karma points c-trib
    Aug 23, 2011 @ 02:20
    Jason Prothero
    2

    Turns out there's a config setting in courier.config that specifies that short filenames should be used.  After setting it to True, my deploys now work.  Yay!

    Thanks Per for the tip!

     

     

  • Brendan Rice 303 posts 466 karma points
    Sep 08, 2011 @ 11:58
    Brendan Rice
    0

    Does anyone know what the config setting is and where it should go please? I can't seem to find it anywhere.

  • Per Ploug 865 posts 3476 karma points MVP admin
    Sep 08, 2011 @ 12:28
    Per Ploug
    0

    I believe it was added in 2.1 or 2.1.1 so you would have to have that version setup, config files are here:

    http://nightly.umbraco.org/UmbracoCourier/2.1.1/

  • Brent Craighead 2 posts 22 karma points
    Oct 12, 2011 @ 23:31
    Brent Craighead
    0

    I made the change in the config file to allow short file names, but I still get the exception. Any other work arounds that don't require shortening of the node names?

  • Per Ploug 865 posts 3476 karma points MVP admin
    Oct 14, 2011 @ 14:29
    Per Ploug
    0

    Hi Brent

    Event though you make the change, existing revisions will have this issue, do you have an exception to post?

    /Per

  • Brent Craighead 2 posts 22 karma points
    Oct 14, 2011 @ 18:45
    Brent Craighead
    0

    My exception is as follows:

     

    Umbraco.Courier.Core.Exceptions.PackageException: Unable to package item 'Mile High For Haiti - 850 KOA and the Haitian Timoun Foundation Make It Easy for Coloradans to Donate to Recovery Efforts this Saturday' from provider 'Documents' into filename 'Mile High For Haiti - 850 KOA and the Haitian Timoun Foundation Make It Easy for Coloradans to Donate to Recovery Efforts this Saturday_1853' ---> 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.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)
    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, FileAccess access)
    at Umbraco.Courier.Core.Serialization.Serializer.SaveToFile(Byte[] bytes, String filePath)
    at Umbraco.Courier.Core.PackagingManager.™(ItemIdentifier itemId, ItemProvider provider, ItemType itemType)
    --- End of inner exception stack trace ---
    at Umbraco.Courier.Core.PackagingManager.™(ItemIdentifier itemId, ItemProvider provider, ItemType itemType)
    at Umbraco.Courier.Core.PackagingManager.š()
    at Umbraco.Courier.Core.PackagingManager.PackageQueue()
    at Umbraco.Courier.UI.Dialogs.CommitItem.PackageSelectedItems()
    at Umbraco.Courier.UI.Dialogs.CommitItem.oneSteptransfer(Object sender, EventArgs e)
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    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.


    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.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)
    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, FileAccess access)
    at Umbraco.Courier.Core.Serialization.Serializer.SaveToFile(Byte[] bytes, String filePath)
    at Umbraco.Courier.Core.PackagingManager.™(ItemIdentifier itemId, ItemProvider provider, ItemType itemType)

     

    My item names are longer than what I would prefer, but I'm trying to make it work.  I have no revisions at this point since I just installed courier and attempting the first deployment to the target site.

     

     

     

     

     

     

     

     

     

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft