locked
Why cross domain call is restricted in Web API RRS feed

  • Question

  • User264732274 posted

    normally cross domain call is restricted in web api and for that we have to enable CORS in web api but beside web api we can develop service with asmx web service and wcf too. wcf or asmx service can be called from other domain using jquery or http client. so tell me why the cross domain call is not restricted in wcf or asmx service ?

    please tell me the reason.

    i am not sure that cross domain call is restricted too in wcf or asmx service. if not restricted then tell me yes or not. please guide me in details. thanks

    Friday, December 2, 2016 8:46 PM

Answers

  • User475983607 posted

    normally cross domain call is restricted in web api

    No, browsers restricts cross domain calls not server applications.

    and for that we have to enable CORS in web api but beside web api we can develop service with asmx web service and wcf too. wcf or asmx service can be called from other domain using jquery or http client. so tell me why the cross domain call is not restricted in wcf or asmx service ?

    Your statement is simply not true.   A cross origin HTTP request (CORS) is nothing more than a browser making a request to a domain other than the domain that sent the HTML loaded in the browser.  The browser makes the decision not the service.   

    At the time of this writing you have 3717 posts.   Most of which have a similar leading tone.   IMHO, you're polluting this forum with misinformation which can be very confusing for new developers looking for a tangible solution to a problem.  Please stop.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 3, 2016 2:12 AM