I have an ajax call that i use to call a web page and i wanted to get the result. The issue with it, is that it doesnt seem to work, and at the moment returns a *jQuery parse Error*. 

When i look in the debug console and click though, it will take me to the page i want, it just doesnt seem to do it via ajax and store the result/ call success.

My code:

```
$.ajax({
  type: "GET",
  url:  "mywebsite",
  data: {username: username, password:password},
  dataType: "jsonp",
  contentType: "application/json",
  xhrFields: {withCredentials: true},
  crossDomain: true,
  success: function(result, status, jqxhr){ alert("success"); },
  error: function(xhr, status, message){ alert(status + ": " + message); }
});

```

as you can see i have some credentials i want to add to it, and i was told to have it in data, instead of doing the ajax options for *username* and *password*.

Im not sure whats going on, and it seems like there is something wrong. I was looking at 3 different approaches via stack overflow, but none seemed to give me the correct answer.

**Posted Data**

```
 Request URL:http://10.224.65.5/mas3/DataSources/inspecttech.inspecttech/Schema/Classes?callback=jQuery17202808878293726593_1373384418801&username=njtax.hinspecttech&password=4e1cb7494843c513ee913d122e30ef2fe27635e5f82f575c92d006691906bebbbdb1fe483cfc06b087f7c4070c2879bd3585234a3614a1f04fca8de64ad6bfaf&_=1373384423017
 Request Method:GET
 Status Code:200 OK
 Request Headersview source

```

**Request Headers**

```
 Accept:*/*
 Accept-Encoding:gzip,deflate,sdch
 Accept-Language:en-US,en;q=0.8
 Authorization:Basic bmRvdG1vYnguaG1vYmlsZWRldmljZTpzdXBlclNlY3JldERldmljZVBhc3N3b3Jk
 Connection:keep-alive
 Host:10.224.65.5
 Referer:http://localhost:3033/BentleyFormIntegrationFrameset.aspx
 User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36

```

**Query String Parametersview sourceview URL encoded**

```
 callback:jQuery17202808878293726593_1373384418801
 username:njtax.hinspecttech
 password:4e1cb7494843c513ee913d122e30ef2fe27635e5f82f575c92d006691906bebbbdb1fe483cfc06b087f7c4070c2879bd3585234a3614a1f04fca8de64ad6bfaf
 _:1373384423017
 Response Headersview source

```

**Response Headers**

```
 Cache-Control:no-cache
 Content-Language:en-US
 Content-Length:801
 Content-Type:application/json; charset=utf-8
 Date:Tue, 09 Jul 2013 15:40:22 GMT
 Expires:-1
 Mas-License-Error-Id:NoClientLicense
 Mas-License-Error-Message:Client's license is invalid.
 Pragma:no-cache
 Server:Microsoft-IIS/7.5
 X-AspNet-Version:4.0.30319
 X-Powered-By:ASP.NET

```

**additional Information**

Preview (In Google Chrome) shows the returned object, but im not sure why it would fail. It looks like it fetched everything correctly.

**Possible alternate Option Via ASP?**

```
HttpWebRequest request = HttpWebRequest.Create(Request.Url.Scheme + "://" + site +"/DataSources/inspecttech.inspecttech/Objects/DeviceDatabase/" +action) as HttpWebRequest;

NetworkCredential cred = new NetworkCredential(bic_name + "x.h" + user.in_username, user.in_password);
request.Credentials = cred;
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
string resp = "";
StreamReader reader = new StreamReader(response.GetResponseStream());
while (!reader.EndOfStream)
    resp += reader.ReadLine();

```