Calling ASMX Service from jQuery Client Side Code -


i have vs 2010 project locally have asmx service running locally. created vs 2010 project has consume local asmx service. reason whenever trigger service gives me 500 internal service error. both applications running on separate ports.

 $.ajax(      {         type: "post",         url: "http://localhost:22059/mobile/hocwebservice.asmx/getcategories",         data: "{}",         datatype: "json",         contenttype:"application/json",         success: function (response) {              alert(response);           }     }      ); 

both applications running on separate ports.

that's problem. violating same origin policy restriction. cannot send ajax requests services not hosted on same origin page containing script (different ports => different domains).


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -