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