0

I use ajaxfileuplad , Before Uploading to Server I test it local it was working , after Uploading to server , I had an issue that the there is no error returned , but the folder still empty no image is uploaded ,

  1. I check the permissions for the destination Folder ( IUSRS , IIS_IUSRS ,etc ...)

  2. the returned URL also correct that means Server path is working

  3. I have added to web.config the Correct Settings.

Control Code : <cc1:AjaxFileUpload ID="AjaxFileUpload1" OnClientUploadCompleteAll="resetControl" MaximumNumberOfFiles="6" AllowedFileTypes="jpeg,jpg,gif,png" BackColor="#FC6810" ForeColor="White" runat="server" OnClientUploadStart="uploadStarted" OnClientUploadComplete="uploadComplete" OnUploadComplete="fileUploadComplete" /> BehindCode :

 string uploadFolder = Server.MapPath("~/usergallery/");
    try
    {
        newfilename = Path.GetRandomFileName() + e.FileName;   AjaxFileUpload1.SaveAs(uploadFolder + newfilename);

    }
    catch { }   

Are there any extra Setting to look for ?

EDIT : ERROR : Uncaught error raising upload complete event and start new upload' this is the error 't.onreadystatechange @ ScriptResource.axd?d=-9YDjdHizPInlZIfdnhPn8S7lpwKI_Y8guh‌​PydxMhsGoEDARRpAj9Eq4wYDzyMDF6zZSq3xA4TLhuv…:1 '

and Error on Server Side : Could not find a part of the path

Note that the Returned Path is Correct.

  • The reason you'ren not getting any errors is becasue of you're not catching them – Izzy Aug 06 '15 at 08:09
  • System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Inetpub\vhosts\mywedfolder\usergallery\1wo2hxub.5eijanson.jpg'. this is what I got after removing the try catch , but the Path is correct. – Tamer Hatoum Aug 06 '15 at 08:26
  • 'Uncaught error raising upload complete event and start new upload' this is the error 't.onreadystatechange @ ScriptResource.axd?d=-9YDjdHizPInlZIfdnhPn8S7lpwKI_Y8guhPydxMhsGoEDARRpAj9Eq4wYDzyMDF6zZSq3xA4TLhuv…:1 ' – Tamer Hatoum Aug 06 '15 at 09:47

0 Answers0