---
title: "using Get for ajax calls gives me 500 error"  
description: "using Get for ajax calls gives me 500 error"  
author: "Anonymous User"  
published: 2014-09-02  
updated: 2014-09-03  
canonical: https://www.mindstick.com/forum/2235/using-get-for-ajax-calls-gives-me-500-error  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# using Get for ajax calls gives me 500 error

I was calling a [[web method](https://www.mindstick.com/interview/746/how-do-you-invoke-a-web-method-of-web-service-in-ajax)] using POST but as I am 'getting' [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) back I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to use GET instead.

Using Post works. Using GET gives me a 500 [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing).

## This is the main jquery call to my [web method]:

```
        $.ajax({            type: 'GET',            contentType: 'application/json',            dataType: 'json',            url: 'Cloud/Feed.aspx/GetNextFrames2',            data: '{ test: "hime"}',~
```

This is my test [web method].

```
[WebMethod][ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]public static string GetNextFrames2(string test){    return 'test'}
```

If I do not pass any [parameters](https://www.mindstick.com/articles/87/passing-parameters-in-c-sharp) I will get no error using GET. As soon as add a [parameter](https://www.mindstick.com/blog/450/parameter-class-in-c-sharp) I get 500 [internal](https://www.mindstick.com/interview/773/describe-the-accessibility-modifier-protected-internal) error.

I have used wireshark and Fiddler but I cannot see anything useful.

This is obviously down to using parameters. So, at [least](https://yourviews.mindstick.com/story/1471/5-autobiographies-you-should-read-at-least-once) I have pinpointed where the error is.

I have tried passing the parameters directly appended to the url:

myurl?par=testme...

but still same error.

What else can I try?

## Replies

### Reply by Sumit Kesarwani

Hi Ankit, try this:\

$.ajax({

type: 'GET',

contentType: 'text/plain',

dataType: 'json',

url: 'Cloud/Feed.aspx/GetNextFrames2',

data: '{ test: "hime"}',


---

Original Source: https://www.mindstick.com/forum/2235/using-get-for-ajax-calls-gives-me-500-error

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
