Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

AjaxFileUpload - DirectoryNotFoundException - Could not find a part of the path

$
0
0

hi, experts, I downloaded latest ajax control toolkit from nuget and added to my .net 4.0 web form project.

version of the control toolkit 7.1213 , published on 12/14/2013

on aspx

<ajaxToolkit:AjaxFileUpload ID="AjaxFileUpload1"
    ThrobberID="myThrobber"
    ContextKeys="fred"
    AllowedFileTypes="jpg,jpeg"
    MaximumNumberOfFiles=10
    runat="server"/>

on web.config, added,

<system.web>       <httpHandlers>        <add verb="*" path="AjaxFileUploadHandler.axd"          type="AjaxControlToolkit.AjaxFileUploadHandler,           AjaxControlToolkit"/>    </httpHandlers></system.web>
<system.webServer><validation validateIntegratedModeConfiguration="false" /><handlers> <add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit" /></handlers></system.webServer>


when I upload the jpg file, I found that the program created a folder inside the c:\temp\   -> C:\temp\_AjaxFileUpload

however, the program cannot create the inner folder for each upload file. e.g. C:\temp\_AjaxFileUpload\5FD72DF0-3BCD-91ED-2B32-6B0661D099E7

I check on the windows sevent viewer, the error messsage is as below. what should be the configuration? it is so strange that the program can create C:\temp\_AjaxFileUpload folder but cannot create the inner folder by  each upload file. e.g. C:\temp\_AjaxFileUpload\5FD72DF0-3BCD-91ED-2B32-6B0661D099E7

is this related to something like the handler????? (I guess) Please kindly help me.

Event log (I guess the core part):

Exception information:
Exception type: DirectoryNotFoundException
Exception message: Could not find a part of the path 'C:\Temp\_AjaxFileUpload\5FD72DF0-3BCD-91ED-2B32-6B0661D099E7\'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
at System.IO.Directory.GetFiles(String path)
at AjaxControlToolkit.AjaxFileUpload.XhrDone(String fileId)
at AjaxControlToolkit.AjaxFileUpload.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>