mardi 24 janvier 2017

faild to Windows authentication in ASP.NET Web API

How can I login on ASP.NET Web API with Windows Authentication?

I'm new to ASP.net Web API.

I want to use Windows authentication in ASP.NET Web API,

So I created new Project by Visual Studio 2015

Then, I changed project property as follows.

"Anonymous Authentication": Disabled
"Windows Authentication" : Enabled

And then, I changed Web.config as follows

<authentication mode="Windows" />
<authorization>
  <deny users="?" />
</authorization>

That's all. No other changes.

I debugged the project with Visual Studio(F5 key). When startup page opens, I input my windows account & password, and it succeed to login. But then When I call api like "api/values/" in same brouser, Authentication dialog is showed again. So I input same account & password but it was rejected.

Is there other setting I have to do?




Aucun commentaire:

Enregistrer un commentaire