Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

204
Vistas
How to Post BLOB data to asp.net webservice with ajax

I'm trying to post blob files to the web service, I couldn't find any solution. What I've tried so far is;

my ajax is;

            var model = new FormData();
            model.append("blob", blob);

            $.ajax({
                type: "POST",
                url: "../CreatePhoto",
                data: model,
                async: false,
                contentType: false,
                processData: false,
                success: function (data) {
                    if (data.d == true) {

                    } else {

                    }

                },
                error: function (e) {
                    console.log(e);
                }
            });

      

And my CreatePhoto.asmx.cs web service is;

 [WebMethod(EnableSession = true)]
 public bool CreatePhoto(HttpPostedFileBase blob){.....}

The problem is, when I try to trigger the ajax function, I'm getting this error on chrome logs;

 System.InvalidOperationException: CreatePhoto Web Service method name is not valid. 
at System.Web.Services.Protocols.HttpServerProtocol.Initialize()

I'm using a classic asp.net web application and my web service is also created with asp.net. There is plenty solution with MVC but, I'm trying to achieve this with asp.net.

ps: i'm able to trigger every other web services under the same URL.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda