I already implemented webapi without authentication and it is working perfectly. but now I want to implement the authorization for the WebAPI.
I tried to create new project with "Individual User Accounts" and add my controllerFile to controller folder and then add <Authorize> in controllerFile but it works only for this default database.
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-IRAApi-20150211114242.mdf;Initial Catalog=aspnet-IRAApi-20150211114242;Integrated Security=True"
providerName="System.Data.SqlClient" />
I just want to set my own database for the same functionality. My Database have same table's name as default database have.
Or is there any other way to do that if person is logged in then generate access token and then person is able to access the web api otherwise not.
I am working on visual studio 2013 and dotnet framework 4.5.