Web API Authentication Issue

Avtandil Prangulashvili 1 Reputation point

I created WEB API project in VS and Authentication type I choose is Individual User Account.
After that I created one model class and controller which has [Authorize] parameter on get data method for testing. Everything has default configuration in web.config and etc.

Problem: When I start project and trying to test with Postman basic authentication it returns Unauthorized 401 status, but when I trying to remove [Authorize] attribute it works well. When I use Postman for authorization I choose Basic Auth and in username and password field I use for example user name: user@Karima ben .com and password: 123123. This user and password is registered in local database already.

Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
312 questions
0 comments No comments
{count} votes