Can you please tell me why this ajax call is not reaching the webservice?

We are trying to user ajax to make a call to a webservice – Authentication/Validate but so far, it can’t find the webservice.

Each time you run the script, you get, “error”, just error.

The webservice is on a different web server while the ajax script calling it is on another server.

However, they are both on port 80 and on same domain.

I have been struggling with this for 2 days.

Script is below.

Thanks alot in advance

<script src="//"></script>
     data: { data: JSON.stringify({ LoginName: "jane.doe",Password: "jdoe" }) },
     success: function (data) {
             var token = JSON.parse(data);
     error: function(a,b,c) {

param=data: {"LoginName":"jane.doe","Password":"jdoe"}

Response body: SyntaxError: JSON.parse: Unexpected end of data


A valid file URL would start with file://, but a file won’t answer your AJAX response in a very useful way.

You need, and they need to supply, a valid URL for the webservice. Something along the lines of


Leave a Reply

Your email address will not be published. Required fields are marked *