Copied to clipboard

Flag this post as spam?

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


  • Geoff Baldwin 80 posts 100 karma points
    Feb 16, 2011 @ 11:46
    Geoff Baldwin
    0

    Directory not Empty error when bulk uploading for Runway Gallery - revisited

    Hi,

    I have returned to a site that I started some months ago but put on the back burner for a number of reasons. I am still getting an error when I try and upload a zip file to the Gallery. I would really appreciate some feedback as to the cause of this issue -- thanks

    I have put the following line in my web.config

    <httpRuntime requestValidationMode="2.0" maxRequestLength="990000" executionTimeout="10000"/>

    I have run this batch file against the site in ISS:

    CLS

    @Echo off
    c:
    cd %windir%\system32\inetsrv
    set /p sitename="Enter the site name : "
    set /p maxupload="Enter the Maximum upload size in bytes : "

    appcmd.exe set config "%sitenam%" -section:requestFiltering -requestLimits.maxAllowedContentLength:%maxupload% -commitpath:apphost
    pause

    with this result:

    Enter the site name : JRBP1
    Enter the Maximum upload size in bytes : 100000000
    Applied configuration changes to section "system.ftpServer/security/requestFilte
    ring" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROO
    T/APPHOST"
    Press any key to continue . . .

    I use the Bulk Upload tab to upoad a zip file of 5107712 bytes.
    I click on Save and get a content saved message. The zip file is in the folder as indicated.

    Then I click Save and Publish and get this error:
    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    The directory is not empty.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IO.IOException: The directory is not empty.


    Source Error:

    The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

      <%@ Page Language="C#" Debug="true" %>

    or:

    2) Add the following section to the configuration file of your application:

    <configuration>
       <system.web>
           <compilation debug="true"/>
       </system.web>
    </configuration>

    Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

    Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario. 

    Stack Trace:


    [IOException: The directory is not empty.
    ]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9726658
       System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive) +747
       System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive) +203
       Umbraco.RunwayGallery.ZipUploadHandler.content_AfterUpdateDocumentCache(Document sender, DocumentCacheEventArgs e) +262
       umbraco.DocumentCacheEventHandler.Invoke(Document sender, DocumentCacheEventArgs e) +0
       umbraco.content.FireAfterUpdateDocumentCache(Document sender, DocumentCacheEventArgs e) +76
       umbraco.content.UpdateDocumentCache(Document d) +1175
       umbraco.content.UpdateDocumentCache(Int32 pageId) +75
       umbraco.library.UpdateDocumentCache(Int32 DocumentId) +150
       umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +462
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       umbraco.controls.ContentControl.savePublish(Object Sender, ImageClickEventArgs e) +96
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +120
       System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

     


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1


    So I add debug = True into web.config and repeat the excercise. The upload took a lot longer. When I click save and publish I get this error:
    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    The directory is not empty.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IO.IOException: The directory is not empty.


    Source Error:


    Line 39:
    Line 40:                     // Delete zipped files
    Line 41:                     Directory.Delete(zipDir);
    Line 42:
    Line 43:                     // Remove property
     

    Source File: c:\UmbracoSites\JRBP1\App_Code\Umbraco.RunwayGallery.cs    Line: 41

    Stack Trace:


    [IOException: The directory is not empty.
    ]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9726658
       System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive) +747
       System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive) +203
       System.IO.Directory.Delete(String path) +23
       Umbraco.RunwayGallery.ZipUploadHandler.content_AfterUpdateDocumentCache(Document sender, DocumentCacheEventArgs e) in c:\UmbracoSites\JRBP1\App_Code\Umbraco.RunwayGallery.cs:41
       umbraco.DocumentCacheEventHandler.Invoke(Document sender, DocumentCacheEventArgs e) +0
       umbraco.content.FireAfterUpdateDocumentCache(Document sender, DocumentCacheEventArgs e) +76
       umbraco.content.UpdateDocumentCache(Document d) +1175
       umbraco.content.UpdateDocumentCache(Int32 pageId) +75
       umbraco.library.UpdateDocumentCache(Int32 DocumentId) +150
       umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +461
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       umbraco.controls.ContentControl.savePublish(Object Sender, ImageClickEventArgs e) +95
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +120
       System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

     


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

     

     

     

  • Geoff Baldwin 80 posts 100 karma points
    Feb 22, 2011 @ 23:54
    Geoff Baldwin
    0

    Has anyone any input on this??

    I have reduced the number of images in the zip file to 20 images (total size 2.8mb) and the problem still occurs.

    Is there a more basic issue?

  • Geoff Baldwin 80 posts 100 karma points
    Mar 07, 2011 @ 20:01
    Geoff Baldwin
    0

    GRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR  !!!!!

     

    It seems this issue was caused by the image files having upper case.JPG as the extension. If I renamed the files with lower case .jpj all is well.

    Spent hours on this issue and just didn't even notice that the extension was uppercase --   WHY does it make a difference????????????

  • aaronb 97 posts 116 karma points
    Aug 03, 2011 @ 23:24
    aaronb
    0

    Ran into this exact same problem today. Thanks a ton for posting your workaround. I'd really like to know if there's any fix for this too as I don't think my client has the tools to batch rename before uploading.

Please Sign in or register to post replies

Write your reply to:

Draft