I have this webservice
[WebService(Namespace = "http://localhost/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
[System.ComponentModel.ToolboxItem(false)]
public class CompanyData : WebService
{ [WebMethod]
public String HelloWorld()
{
return "Hello JSON";
}
}
in the same directory i have an edge generated HTML File
In the scene, there is a button with this code onClick
$.ajax({
type: "POST",
url: "CompanyData.asmx/HelloWorld",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: 'json',
success: function(response)
{
//get the value of a Symbol variable
//sym.getComposition().getStage().sym.getSymbol("feedback").html(response.d);
this.play();
},
failure: function(msg)
{
sym.getComposition().getStage().sym.getSymbol("feedback").html(msg);
},
error:function (request, status, error)
{
}
});
The success function does not get reached. I can't figure out why. Tried variations of the code, read other examples - still not working.
I have used the error and failure
What am i doing wrong ? Both pages are on IIS 7 on localhost
Thanks in advance