I am a .net developer willing to learn mobile web technology. currently i am working on Android platform. I found Jquery to be suitable framework for me as i am from web background. Till now i am able to create a simple web application on android but, i am not able to make AJAX calls from Jquery to my .net webservice. I want to create a test enviornment for my android web app.
1. I have ASP.NET web service running on my local computer
namespace JqueryMobile
{
[System.Web.Script.Services.ScriptService]
public class WebService1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
my webservice URL is : http://localhost:26415/WebService1.asmx
2. My android index.html
$(function(){
$.ajax({url:"localhost:26415/WebService1.asmx/HelloWorld",
success:function(result){
alert(result);
}});
});
This technique fails in local environment so, how do i test it?