The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
0answers
33 views

Calling Web API vs adding reference to underlying dlls

This is more of an Architecture question, and I want to know all the possible pros and cons of the approach. In my org, we have an ASP.NET Application say "A", a Web API Project say "W", and ...
3
votes
1answer
157 views

why Web API 2 has RouteConfig.cs file?

I m working on Web API project, and it is using WebApiConfig.cs file to defined routs for Web API. Web API fold RouteConfig.cs file. I have googled and they say RouteConfig.cs is for MVC routing. It ...
0
votes
0answers
55 views

Row and Field level Security Management through Code First EF, WebApi2

I could not find such question specific to asp.net webapi row level security on SO. I am building an API through .NET Webapi2 with Entity Framework. I am trying to assess various options that are ...
1
vote
1answer
83 views

WebAPI authorisation for other apps

I would like to create a WebAPI application that can serve some of my web sites. My goal is to abstract some common task such as email sending, address resolving etc by providing an API to all of my ...
0
votes
1answer
151 views

REST API design for associations/aggregation

I am building RESTful API that manages persons and lists. There can be many List and many Person each with its own set of properties. Person can be in zero or more lists, List can contain zero or more ...
1
vote
2answers
164 views

Is RESTFUL API as back-end service one of the best (or suitable) choice for Mobile App? [closed]

I have a background on .NET development, recently I was asked to code back-end service for a mobile app. I had experiences on MVC, and now I'm trying to understand more on Restful Web API. My ...
1
vote
1answer
211 views

How to manage security of these self hosted web apis, to ensure that the request coming for accessing data is authenticated?

Let's pretend I am going to work on an enterprise application. Say I have 11 modules in the application and I would have to develop Dashboards for every role in the organization for whom I are going ...
0
votes
0answers
56 views

Single result as REST/ODATA response on GET

In an API which should be both restful and support OData for different client types. I have an endpoint that always returns a single result. Should I: Return the entity as a single entity? Put it ...
0
votes
1answer
80 views

Why Microsoft’s Web API is named as ASP.Net Web API

ASP.Net is Active Server Pages using .Net Framework Wikipedia says It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server ...
0
votes
0answers
33 views

Error messages from Web API, should I use error codes? [duplicate]

I'm developing a Web API. Error messages that are returned from my controllers are currently being displayed directly by the consumer applications. I want to change it so that the consumer is ...
2
votes
2answers
2k views

Should we call Web API from MVC application in same solution?

I am working on a project in MVC that has mobile application so one thing is clear that we have to use Web API so it can used in mobile application. After creating API when we started to develop Web ...
3
votes
5answers
2k views

Pure Front end JavaScript with Web API versus MVC views with ajax

This was more a discussion for what peoples thoughts are these days on how to split a web application. I am used to creating an MVC application with all its views and controllers. I would normally ...
0
votes
3answers
184 views

Best practices for caching search queries

I am trying to improve performance of my ASP.net Web Api by adding a data cache but I am not sure how exactly to go about it as it seems to be more complex than most caching scenarios. An example is I ...
0
votes
2answers
1k views

Web API architecture design

I'm learning and diving into Web API. I've used web services before but not specifically with web API. Below is how I am designing it so far and I was curious on the feedback. I have a ...
3
votes
2answers
195 views

How to support different API Versions

I am writing a Rest API and am wondering how best to handle supporting the different versions. By this I don't mean how to define a URI as V2 or V3, but rather how to structure the code given that ...
0
votes
0answers
105 views

Using web api or libraries

We currently have 1 domain and 4 subdomains using 5 different applications. We are programming in asp.net and we have 6 different solution project. 5 applications and 1 solution for shared back-end. ...
3
votes
1answer
330 views

What is the clean way to pass my LoginContext down through the layers to the data access layer?

I have inherited an API implemented using ASP.NET WebApi 2. The actions on the controllers are all like this: public object Get(long id) { LoginContext loginDetails = GetLoginDetails(); if ...
3
votes
2answers
907 views

What am I missing in my (mis)understanding of IoC/DI/Castle Windsor?

Okay, so here's how I understand IoC and DI in Web API to work when using Castle Windsor. Note, though, that my confidence that I understand it as I should, though, falls somewhere between my ...
1
vote
1answer
237 views

Invoking a web service in a Web API Project…in which layer to invoke?

I am using Microsoft ASP.NET Web API 2 and one of my end points has to internally invoke a legacy non-Microsoft web service (not asmx or svc) . Which layer should I invoke this in? I currently have ...
1
vote
1answer
234 views

What kind of user authentication do I need in for a restful web api

I am doing a restful web api with asp.net Web API 2 I do not want to use any form of cookies or basic authentication (send user/pass in cleartext thus SSL needed) I do not use/need claims stuff. I ...
0
votes
1answer
111 views

How to configure these REST API Resources [closed]

I'm still in the design phase of my REST API, and I'm a bit stuck on how to configure the resources. The API will be consumed by mobile devices (Android, iOS, and Windows). Communication through ...
2
votes
1answer
295 views

Restful WebAPI VS Regular Controllers

I'm doing some R&D on what seems like a very confusing topic, I've also read quite a few of the other SO questions, but I feel my question might be unique enough to warrant me asking. We've never ...
1
vote
1answer
166 views

Is it feasible to change model relationship mappings and properties in Entity Framework CodeFirst at runtime?

Here's the situation. I have an enterprise application that uses EF Codefirst to map POCOs to an existing database. This has been working fine so far. In fact I would say that it's been working really ...
0
votes
1answer
343 views

bad practice to have actions in web api controllers

I was creating a new action for a WebApi controller and tried to create a url using the following: @Url.RouteUrl("DefaultApi", new { httproute = "", controller = "ClientApi"}) and noticed that the ...
2
votes
1answer
150 views

when is it necessary or when should a controller be async

When is it absolutely necessary for a controller to be async? Should all controllers be async or is it bad practice to make all of them async unless it is necessary. Just looking for some general ...
1
vote
1answer
409 views

necessary to migrate to Web API from MVC controller

Since the released of Web API, I've been wondering whether it's necessary or helpful to migrate/change MVC controllers to use Web API calls. Since it's hard to describe code I'll show an example of ...
8
votes
1answer
1k views

Is there an advantage to using WCF or WebAPI for mobile?

I'm looking at doing my first mobile development using Mono Touch and Mono for Android. I'd like them to communicate with an ASP.NET MVC 4 site I'm designing. I've worked with WCF and WebAPI in the ...
1
vote
1answer
998 views

project layout using webapi

I have the following project structure I would like to implement. I would like to know if there are any pitfalls to structuring my code this way. It is going to be using Microsoft's WebAPI, an MVC 4 ...