success problem in uploadbox

Hi,

I need get a message in client when the file is upload. In local it works fine, but when I deploy the web it doesn't work. (I deploy the web in https server)

My controller code:

Message return Done or Error
 public JsonResult SavePerfilado(IEnumerable<HttpPostedFileBase> uploadPerfilado)
{

          string mensaje = "Done";
            foreach (var file in uploadPerfilado)
            {

               
                var fileName = Path.GetFileName(file.FileName);
                var destinationPath = Path.Combine(Server.MapPath("~/Ficheros/Perfilado"), fileName);
                file.SaveAs(destinationPath);             
                    try
                    {
                        sendByFtp(destinationPath);
                      
                    }
                    catch (Exception ex)
                    {
                        mensaje = ex.Message + "\n" + ex.InnerException.Message;
                        break;
                    }
                }
            }
            return Json(mensaje);
        }

client code

 function success(args)
    {
        //alert(args.responseText);
        if (JSON.parse(args.responseText) == "Done")
            swal("Fichero Subido", "El fichero se subio correctamente", "success");
        else
            swal("Error", args.responseText, "error");
    }

In local mode, it args.responseText has the correct value



But in my server not (my server is https)



What can I do?

Thanks





1 Reply

PO Prince Oliver Syncfusion Team November 23, 2017 12:40 PM UTC

Hi Manolo, 

Thank you for contacting Syncfusion forums, 

Unfortunately, we could not recreate the issue at our end. Please find the attached test sample which tries to replicate the issue at our end. Kindly refer to the following link for the sample: http://www.syncfusion.com/downloads/support/forum/134669/7z/uploadWebserver-865586208 

We suspect the issue to be general as our upload box’s success event works similar to AJAX’s success event. Please check the above sample in your server. Maybe you can modify the above to exhibit the issue and send it back to us for further investigation with additional information. 

Regards, 
Prince  


Loader.
Up arrow icon