Windows Server 2008, IIS7, and Windows Authentication

We currently have a development server that we are trying to test on a computer with a Windows authentication code.

We have perfectly enabled Windows authentication in IIS7 in Windows Server 2008 R2 and we ask the user for a username and password as excluded, but the problem is that he does not 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 of the theories that we have is that we do not yet have Active Directory, we just check this by logging in through the machine name and not into the domain.

Is this type of authentication applicable only to domains (if possible, we can install Active Directory and some test accounts) - or can I get a user ID when I log in using the machine name?

Ideally, we would like to test this on our local machines (Windows 7 Pro) using our own accounts (again this is not in the domain) and IIS, but this has the same problem as our dev server.

** Note. I also asked about this on serverfault, but I think this question crosses both the server and the programming line. **

Thanks,

+4
source share
1 answer

Finally understood, playing. If anyone is interested, here's what I did ...

In Windows Server 2008, I opened the "Change Local Users and Groups" policy. I added a new user for the client. Then in IIS, I set up authentication only for Windows authentication, then I opened "IIS Manager Permissions" and added a new user and myself.

Not quite sure if this is the exact way, but it seems to work for us.

+2
source

All Articles