MVC5 vs Windows Authentication in IIS 7.5: Unable to Log In

I am trying to protect an Asp.Net MVC5 application to use Windows authentication.

I mainly followed this article: http://msdn.microsoft.com/en-us/library/gg703322%28v=vs.98%29.aspx

And when I go to the pages, the login / username text fields are presented to me: enter image description here

I am typing the correct username / password and I am again asked the same details. And again and again. I tried adding the machine name before the login (the local computer does not have a domain), but no luck.

In web.config, I have:

<authentication mode="Windows" />

In IIS 7.5 for authentication, I have the following:

enter image description here

The controller action I am requesting is as follows:

public partial class HomeController : BaseController
{
    private readonly IMediator mediator;

    public HomeController(IMediator mediator)
    {
        this.mediator = mediator;
    }

    public virtual ActionResult Index()
    {
        var model = mediator.Request(new MenuModelQuery());
        return View(model);
    }

( ) - . - - . [AllowAnonymous] - . [ (User = "trailmax" )] - .

Fiddler , , / :

:

GET http://reporting.dev/ HTTP/1.1
Host: reporting.dev
Connection: keep-alive
Cache-Control: max-age=0
Authorization: Negotiate TlRMTVNTUAABblahblahblahblah=
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8

:

HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
WWW-Authenticate: Negotiate TlRMTVNTUAACAAA_some_long_stringkLP9zgEAAAAA
Date: Fri, 20 Dec 2013 18:44:50 GMT
Content-Length: 341
Proxy-Support: Session-Based-Authentication

. -?

+4
2

- hosts. , -, hosts, .

http://localhost:81, Windows .

, . , IIS / . - .

+3

, , . , Chrome , , Chrome.

IE , Chrome , Basic Authentication Windows.

0

All Articles