I created a Web Api 4 Project using Windows Authentication, and then added an [Authorize(Roles="Administrators")] attribute to the Get() Method of the ValuesController. When I try to Access thehttp://.../api/values URL, I am prompted for credentials since I am not a member of the Administrators group. That is not the behavior I want, but rather I just want a 401 immediately. Does anyone know what I need to do to accomplish that?
↧