smwikipedia
smwikipedia

Reputation: 64453

Difference between ASP.NET Web API and WCF regarding the Authentication mechanisms

I am making a choice between ASP.NET Web API and WCF.

I am not quite sure about the authentication part. Could some one shed some light on the differences?

Upvotes: 0

Views: 158

Answers (1)

Pantelis Natsiavas
Pantelis Natsiavas

Reputation: 5369

I suppose there would be no actual difference under the hood. After all, the authenticaton mechanism refers to the HTTP request level on the ASP.NET engine integrated in IIS. It should have nothing to do with whether the module responding the specific HTTP request is implemented as an ASP.NET web page, WCF or Web API endpoint.

Nevertheless, there would be some differences in modelling and perhaps in configuration. WCF models the authentication mechanism as a "WCF authentication service" while Web API uses the normal security model of ASP.NET.

Use this WCF and ASP.NET security guide and this Web API security guides as a reference.

Hope I helped!

Upvotes: 2

Related Questions