Jquery Ajax Error 403 Forbidden
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow networkerror 403 forbidden ajax the company Business Learn more about hiring developers or posting ads with us Stack
403 Forbidden Error In Ajax Post Call
Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community ajax get 403 forbidden of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up AJAX 403 forbidden when making ajax request up vote 4 down vote favorite The website initiates ajax
403 Forbidden Ajax Call
request but always get return 403 error for all browsers. I tested it by initiating the same call in firebug console, it works (status: 200) What is the problem can be deduced? jQuery.ajax({ url: "cart_ajax_get_product.php", data: {id: 355, qty: 1}, success: function(data) { }); }, error: function(err) { } }); Thanks ajax general-network-error share|improve this question edited Jan 28 '13 at 4:06 Musa 66.2k106384 asked Jan 28 '13 at 3:11 Ictuser Ai 403 forbidden error in jquery 2113 Can we get some of your code to help you out better. –AgnosticDev Jan 28 '13 at 3:12 403 is a permissions error, which could stem from the AJAX method expecting a post request instead of a get request from your browser. But without code or at least a link to the page that's causing the problem, we can only guess. –cliffbarnes Jan 28 '13 at 3:38 jQuery.ajax({ url: "cart_ajax_get_product.php", data: {id: 355, qty: 1}, success: function(data) { }); }, error: function(err) { } });
–Ictuser Ai Jan 28 '13 at 3:43 I asked my hosting company,,, and got reply that my website violate some restriction rule detecting for sql injection by mod_security .... it should relate to cookies, raw: "%7B%22cart%22%3A%5B%7B%22id%22%3A305%2C%22qty%22%3A1%7D%5D%7D", value: "{"cart":[{"id":305,"qty":1}]}" could anyone help for this problem ? –Ictuser Ai Jan 28 '13 at 4:58 more findings: cookie causes 403: {"cart":[{"id":411,"qty":"4"}]}, I modified it as {"cart":[{"id":411,"qty":4}]} by Firebug and refresh the page, 403 disappeared. I don't know why. –Ictuser Ai Jan 28 '13 at 6:24 | show 2 more comments 2 Answers 2 active oldest votes up vote 0 down vote Might be an issue related to apache mod_security. Try forcing the ajax request to GET instead of POST: jQ
here for a quick overview of the site Help Center
Post 403 Forbidden
Detailed answers to any questions you might have Meta
Jquery Ajax 403
Discuss the workings and policies of this site About Us Learn more about Stack Overflow jquery ajax handle 403 the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question http://stackoverflow.com/questions/14554935/ajax-403-forbidden-when-making-ajax-request x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Jquery ajax method calling web service receiving 403 forbidden up vote 0 down vote favorite I have http://stackoverflow.com/questions/15905778/jquery-ajax-method-calling-web-service-receiving-403-forbidden a html page with the following ajax method: $(document).ready(function() { $.ajax({ type: "POST", url: "http://www.webservice.com/blahblah.asmx/blahb123", data: "tnWsGuid=TEST1", dataType: "json", contentType: "application/json; charset=utf-8", success: function(msg) { alert("sucess") }, error: function(e) { alert(JSON.stringify(e)); } }); }); Which is returning to me 403 forbidden. A fellow co-worker built the web service and I do not have access to the code nor do I have the current ability to change it as he is on vacation. I need to display this data - at this point everything I try is failing and giving me a 403 forbidden error. I have changed the url name and the success function to just a alert dialog for the purpose of displaying the code. One other thing is that the json is wrapped in XML it seems, coming from a ASP.NET webservice which looks like this:
in the picture below. Send Cancel From : guestTo : Subject : Content : Type the characters you see in the picture below. Send Update CancelFeedbackEmail IDSubject : https://forum.jquery.com/topic/403-forbidden-ajax-call Comments : Send CancelPrivate MessageType the characters you see in the picture below. Type the characters you see in the picture below. Attach files Desktop Zoho Docs Google Docs Each Attachment size should not exceed 1.0 MB. Max no of attachments : 3Loading User Profile... guest Response titleThis is preview!Attachments Publish Back to edit Cancel ()Sign In New to this 403 forbidden Portal? Click here to Sign upYou can also use the below options to loginLogin with FacebookLogin with GoogleLogin with Yahoo jQuery Plugins UI Meetups Forum Blog About Donate All Forums Recent Posts Log In Search jQuery Search jQuery Forum Move this topicForum : Getting StartedUsing jQueryUsing jQuery PluginsUsing jQuery UIDeveloping jQuery CoreDeveloping jQuery PluginsDeveloping jQuery UIQUnit and TestingAbout the jQuery error 403 forbidden ForumjQuery ConferencesjQuery MobileDeveloping jQuery Mobile Sub forum : Move this topic Cancel Getting Started mohitarora 403 forbidden ajax call in Getting Started • 6 years ago hi i m new to jqueryi have to call a web service http://tt.shine.com/AccountAPI/NewAccountWS.asmx/CheckExistingCompany?text=anyname$.ajax({ type: "POST", url: url, data: "{}", dataType: "html", success: function(msg) { // Replace the div's content with the page method's return. alert(msg); //$("#Result").text(msg.d); } });this code is working fine in IE but in mozilla its giving 403 forbiddenPlease help me Thanx in advance 1 Reply Replies(3) barelyfitz Re: 403 forbidden ajax call 6 years ago Is your page also on tt.shine.com?You cannot do cross-domain ajax requests, refer to the following:https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript Leave a comment on barelyfitz's reply mohitarora Re: 403 forbidden ajax call 6 years ago Thanx so much for your reply.My page is not there on tt.shine.com.But i got ur point that cross domain ajax request is not possible.Thanx again for ur reply. Leave a comment on mohitarora's reply barelyfitz Re: 403 forbidden ajax call 6 years ago Here are some strategies for working around the same