У меня есть простая HTML-страница, имеющая это -:
$.getJSON("http://www.bebas.co.in/myservice.asmx/functionName?callback=?",
function(response) {
//manipulate response
});
///
и в файле myservice.cs у меня есть это ..
[WebService(Namespace = "")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class myservice : System.Web.Services.WebService
{
public myservice()
{
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string functionName()
{
//database access..
Dictionary<string, object> result = new Dictionary<string, object>();
result = JsonMethods.ToJson(dsResult.Tables[0]);
//other operations...
return new JavaScriptSerializer().Serialize(result);
}
}.................
Я хочу иметь междоменный доступ ... но не могу этого сделать ... firebug дает мне
Формат запроса не распознан для URL, неожиданно заканчивающегося на ...
что мне делать?