title: Asp.Net MVC with Web Api
body: <p>I am looking for a good approach for implementing intranet Web Application using Web Api(2) with Asp.net MVC(5).
  Application is designed in such a way that we use AngularJS SPA at client side and in server side MVC with Web Api as a single application/web site. MVC is because we have to  restrict the operations based on the security permissions. We don't render the action buttons(eg. Save, Delete etc) when we call MVC controller for views if the user does not have permission. Other operations are utilizing Web API methods to Save, Delete etc,</p>
  
  <p>Basic idea is </p>
  
  <p>MVC Controllers are for generating views with action buttons removed if the user doesn't have permission(html templates for AngularJS).
  Data Manipulation is through Web API(AngularJS $http service web api calls)</p>
  
  <p>Questions here</p>
  
  <p>How do we derive an authentication mechanism which we can utilize for both MVC and Web API?
  (We can create Authentication filters but we have to create separate filters for MVC and Web API, right?)</p>
  
  <p>Once the user is authenticated how do we share this info with both MVC Controller and Web Api controller instead of validating the user each request from angular js?</p>
  
  <p>Is it possible to use ASP.Net forms authentication for both MVC and WebApi for authentication?. If so how do we do that?. Will forms authetication token validates for both MVC controller and Web Api controllers automatically using [authorize] attribute?</p>
  
  <p>Also I would like to know, is it a good approach mixing MVC with WebApi with in a single application? </p>