jakejgordon jakejgordon - 3 months ago 32
ASP.NET (C#) Question

Same Origin Policy For Classic ASP to ASP.NET 4.0

I am using a classic asp site to call an ASP.NET 4.0 Http handler. These are both deployed on the same server. I am attempting to make a jquery 1.6 AJAX call to the handler. In IE, I always get an error of "No Transport". In Firefox and Chrome, the request goes through without any problems. Some searches on the "No Transport" error lead me to believe that the problem is related to the same origin policy.

According to https://en.wikipedia.org/wiki/Same_origin_policy, it doesn't seem like I should be having any trouble with the same origin policy. Both have the same domain, protocol and use the same port number, so the origin should be considered the same between the two.

url: "/filehandler/DeleteHandler.ashx",
data: someData
success: OnSuccessFunction,
error: OnErrorFunction

Every time this AJAX call is made in IE, the OnErrorFunction callback function gets called with an error on "No Transport".

Any ideas?


See the link below for the solution. We had to add this line get it working, which implies that it was in fact a same origin policy issue:

jQuery.support.cors = true;

This still doesn't answer the question of "Why does it think there is a violation of the same origin policy?" but we are just happy to have it working.

Answer: jQuery Call to WebService returns "No Transport" error