Windows Server 2008, IIS7 and Windows Authentication

Posted by Chalkey on Server Fault See other posts from Server Fault or by Chalkey
Published on 2010-12-10T11:09:20Z Indexed on 2011/03/20 8:11 UTC
Read the original article Hit count: 500

We currently have a development server set up which we are trying to test some Windows authentication ASP.NET code on.

We have turned on Windows Authentication in IIS7 on Windows Server 2008 R2 fine, and it asks the user for a username and password as excepted, but the problem is it doesn't appear to accept any credentials. This code for example...

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Page.Title = "Home page for " + User.Identity.Name
End Sub

...always returns an empty string.

One theory we have is that we dont have Active Directory installed as of yet, we are just testing this by logging on via the machine name not a domain.

Is this type of authentication only applicatable to domains (if so we can probably install Active Directory and some test accounts) - or is it possible to get the user identity when logging in using the machine name?

Ideally we would like to be able to test this on our local machines (Windows 7 Pro) using our own accounts (again these aren't on a domain) and IIS but this has the same issue as our dev server.

Thanks,

© Server Fault or respective owner

Related posts about windows-server-2008

Related posts about windows-7