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.