Last post Nov 22, 2013 07:31 PM by imran_ku07
Nov 20, 2013 03:27 PM|Zay Yar|LINK
Nov 20, 2013 07:07 PM|francesco abbruzzese|LINK
What do you mean with external WebApi?
Nov 21, 2013 11:04 AM|Zay Yar|LINK
WebApi from seperate machine.
Nov 21, 2013 12:08 PM|francesco abbruzzese|LINK
Do you mean WebApi runs of a different Web domain than the calling page?
If yes, cross domain ajax calls are forbidden for security reasons (several attacks are possible ). However you may use the CORS protocol. I advice to read about it and about all security implications. Then you don't need to do too much on the client side
if the browser supports CORS it will do all jopb for you. HOWEVER, the webapi machine must be configured to support CORS protocol.
There is a CORS nuget package you may use on the WebApi machine: Microsoft ASP.NET Web API 2 Cross-Origin Support
However it is essential you understand how to configure everything to avoid attacks. If you already knows the domain the Cross domain calls come from you may configure CORS to accept CORS calls only from that domain...this solve all security problems.
Nov 22, 2013 07:31 PM|imran_ku07|LINK
There are huge bunch of Real World ASP.NET MVC 5/WEB API/SPA samples at,
I hope you will find what you are looking for.