In my Sencha touch app. i use .net websevice to get data in xml format. I call it using Ext.Ajaxrequest as bellow
var frmurl ='http://Server/sencha/WS/web.asmx/GetData';
Ext.Ajax.request({
url: frmurl,
method: 'post',
params: {
whereCondition :WhereCond,
ReportName:rptname
},
success: function(Response) {
renderReport(Response.responseText,'1');
}
, failure: function (Response, request)
{
Ext.MessageBox.alert('Error, unable to load data');
} //</failure>
});
Its working fine and giving me correct result but i need to add below tag in web.config to make it working
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
But due to this anyone can invoke webmethods which is major security issue. if i remove this tags then unable to call webservice and gives internal server error.
Please help me. thanks