EmberJs with Asp.Net Web Api on localhost


Still very much a n00b with ember (but love it!) so excuse me if this have beeen asked and answered before.

I created a model, routes, etc to show a list of items, and edit / add / delete. Just to get off the ground, I configured all this to use firebase (nice one that!)

However now I need it to use an api hosted on my local machine (dev) created with Asp.Net Web Api and I’m a little unsure how to do that.

All I did so far was changing the adapter (application.js) to use DS.RestAdapater instead of FirebaseAdapter and set that URL. That seems to work ,but i get the following error:
Ember Data Request GET http://localhost/myapi/api/mycontroller returned a 0 Payload (Empty Content-Type)

I’m pretty sure just now it also gave a cors error, but cannot see that anymore.

A push in the right direction?

ps: If I open the url I’m trying to retrieve data from in my browser it show the json fine.

The way ember data and asp.net web api expects/sends json (restAdapater uses json to communicate) is different, hence is your error. This is great post by Paul to help you.