500 Internal Server Error Jquery.js
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 the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Debugging jQuery ajax 500 Internal server error up vote 6 down vote favorite 3 My working CodeIgniter site is giving a 500 Internal Server Error while hosting it on MediaTemple. It is happening during a jQuery Ajax call. I have no idea what could have gone wrong. Is the error from the controller or the model? My Ajax call: $.ajax({ url: "", type: 'POST', data: form_data, success: function(msg) { window.location.href = "" return true; }, error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); alert(xhr.responseText); } }); xhr.responseText has returned me
The action you have requested is not allowed.
. But what does that mean? jquery ajax share|improve this question edited Jul 7 at 14:12 TylerH 10.9k63666 asked Mar 8 '13 at 0:11 Himanshu Yadav 4,2852485158 I don't understand why you have msg in success: function(msg) if you don't even use it in this function? Check if variable posted to/received from controller are of good type. –Iwo Kucharski Mar 8 '13 at 0:16 500 Means a server error, the problem is not with your jQuery code, the problem is with the server. –Benjamin Gruenbaum Mar 8 '13 at 0:20 @BenjaminGruenbaum Ok I understand that problem is with server code. But how I am going to debug it? –Himanshu Yadav Mar 8 '13 at 0:23 I think for this ajax call you use 'Post', while how did you implement you controller, does it accept 'Post' call or 'Get' call? and was the url mapped in your controller? –OQJF Mar 8 '13 at 0:36 add a comhere 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 the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Jquery Ajax Post - internal server 500 error up vote 5 down vote favorite http://stackoverflow.com/questions/15284413/debugging-jquery-ajax-500-internal-server-error I am trying to post with ajax. but I am getting internal server 500 error. $.ajax({ type: "POST", url: "Services/UserServsice.asmx/UserLogin", data: "{'Username':'" + username + "','Password':'" + password + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (result) { debugger; }, error: function () { } }); the method: namespace Project.Services { [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] [System.Web.Script.Services.ScriptService] public class UserService : System.Web.Services.WebService { [WebMethod(EnableSession = true)] public http://stackoverflow.com/questions/22038177/jquery-ajax-post-internal-server-500-error string UserLogin(string Username, string Password) { if (Username == "yasin" && Password == "123456") { return "true"; } else { return "false"; } } } } What is the problem ? why i am getting the internal server 500 error ? c# jquery asp.net ajax share|improve this question edited Mar 9 at 13:02 Govinda Rajbhar 1,39011537 asked Feb 26 '14 at 10:14 user999822 1701516 You can debug it with your browser, press f12 and see what error it gives. –Kuzgun Feb 26 '14 at 10:19 add a comment| 4 Answers 4 active oldest votes up vote 3 down vote Look at your code url: "Services/UserServsice.asmx/UserLogin", I think you misspelled your service name. It should be url: "Services/UserService.asmx/UserLogin", share|improve this answer answered Feb 26 '14 at 10:29 s.k.paul 1,77962868 what is the difference ? –Moh Arjmandi Oct 7 '15 at 11:09 add a comment| Did you find this question interesting? Try our newsletter Sign up for our newsletter and get our top new questions delivered to your inbox (see an example). Subscribed! Success! Please click the link in the confirmation email to activate your subscription. up vote 3 down vote First you need to enable and see detailed errors of your web messages because this is
in the picture below. Send Cancel From : guestTo : Subject : Content : Type the characters you see in the picture below. Send Update CancelFeedbackEmail IDSubject : Comments : Send CancelPrivate MessageType the characters you see in the https://forum.jquery.com/topic/get-method-returns-500-internal-server-error 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 Portal? Click here to Sign upYou can also use the below options to loginLogin with FacebookLogin with GoogleLogin with Yahoo jQuery Plugins 500 internal 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 ForumjQuery ConferencesjQuery MobileDeveloping jQuery Mobile Sub forum : Move this topic Cancel Using jQuery Jānis Vei.. GET method returns 500 Internal server error. in Using jQuery • 2 years ago Hello.I'm new here 500 internal server so I have some question.So I'm developing a web page, but there ir some problem.I have map with are tags, that onclick runs a function "getObject(this.alt)".function getObjects(object){console.log(object);$.get("/sites/map/objects.php?t="+object, function(data) { $('#answer').html(data);});Ir runs file object.php were t= area tags alt attribute, the objects.php connects to MySql and returns objects row, but I get this kind of error:GET http://mysite.com/sites/map/objects.php?t=some_object 500 (Internal Server Error) jquery-latest.js:8706Can you please help me? :) 1 Reply Replies(3) dsvick Re: GET method returns 500 Internal server error. 2 years ago That means that there is a problem with php page. If all you're getting is the generic 500 message then you'll probably need to get into the server logs to figure out what the error is. Once you have the error corrected you'll get back meaningful data to the ajax that will then be placed into the answer element.As a guess though, the url shown in the error message has "t=some object", is "some object" a valid object that can be found in the database?Dave Leave a comment on dsvick's reply Jānis Vei.. Re: GET method returns 500 Internal server error. 2 years ago Yes. "some object" is alt atribute to area tag, that is the same in database. In PHP I output the "some object" row from database. I