Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am getting the Method not allowed exception while calling the wcf service from jQuery ajax.

Can any one guide me.
JavaScript
$.ajax({
                type: "POST", //GET or POST or PUT or DELETE verb
                url: 'http://vsp065:5858/Service1.svc/GetData',
                data: { value: "5" },
                contentType: 'application/json; charset=utf-8', // content type sent to server
                dataType: 'json', //Expected data format from server
                processdata: true, //True or False
                success: function (msg) {//On Successfull service call
                    debugger;
                },
                error: function (xhr, status, e) {
                    alert(e);
                } // When Service call fails
            });
Posted
Updated 12-Dec-13 3:46am
v2
Comments
RaisKazi 12-Dec-13 9:48am    
What happens if you enter url into Browser? And why are you not using GET?
Aaditya parcha 18-Dec-13 8:55am    
hi @raiskazi thanks for the reply..the URL is working fine in the browser.
when i used Get also i am facing the same issue
can u help me out

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900