Link to home
Start Free TrialLog in
Avatar of jdana
jdanaFlag for United States of America

asked on

Missing some key nuances of configuring an ASP.NET MVC app to handle RESTful requests.

I've boldly lept into the Ember.js universe, and my Ember advisors are awesome. Here's the rub, I'm locked into an IIS / ASP.NET / MSSQL combo for my web / application / DB due to client requirements. The MSSQL element is a good thing; I know it well. The IIS / ASP.NET elements, however, have been giving me trouble.

I've been using the ASP.NET MVC API template for Ember.js by Xinyang Qiu, Nathan Totten, and Thiago Santos as a starting point. While the API contains some real gems, there are aspects of it that mystify me: A simple POST request hits the API. The following screenshot represents the request, the request headers, and the request payload.

User generated imageThe above request results in the following method being called in the API's controller. Additionally, todoListDto, the data-transfer object, is fully populated with the request payload.

User generated imageHow is the API pulling this off?

The above method, PostTodoList, is of the type HttpResponseMessage. I suspect that's part of it.
PostTodoList is in the class TodoListController which derives from ApiController. That may be part of it.
Global.asax calls a few methods at startup that I suspect play a key role in the process.

User generated imageI recognize that I'm no ASP.NET MVC expert, far from it. I simply need to know enough of ASP.NET MVC to build a RESTful API for Ember.js. I'm not shy of going to the literature. Just point me to the right literature. I'm also not shy about asking for help. If you can point me to an appropriate online community, I'm happy to go there.
ASKER CERTIFIED SOLUTION
Avatar of Dustin Hopkins
Dustin Hopkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdana

ASKER

Dustin,

Wow. This is a terrific response. Any chance you're free to do some consulting work on this project? My Ember guru, Ian, has been insistent, "Conform with the JSON API." I think he's right, but accomplishing this on the .NET side currently feels daunting. I'm confident you could save me days, if not weeks, of effort. Let me know if you're interested.

John
John, I appreciate the offer, however I'm currently swamped with a couple of projects.

Thank you,
Dustin
Avatar of jdana

ASKER

Steller solution. Thanks again, Dustin.

J