2
votes

I'm trying to achieve the simplest functionality related to windows authentication in DotNetNuke. What I need is just the user to be authenticated using windows authentication when accessing DNN site (no need for user to be logged in within DNN) and read his username (HttpContext.User.Identity.Name).

How can I achieve this as simple as possible?

Is it possible without using any 3rd party authentication providers e.g. DNN Auth: Active Directory?

2

2 Answers

2
votes

If you need the user to be in the domain to get to the site, but don't want them in the actual DNN site as a user, simply deny "anonymous" access to the website and require windows authentication. IIS will handle this for you.

This is all configured in IIS under the AUthorization option.

1
votes

I bet I know what your problem is...

Try this: create a new user in DNN whose username is: DOMAIN\username

Where DOMAIN\username matches that of a Windows User on that machine. As Mitchel pointed out, deny Anonymous and enable Windows auth for the DNN site in question in IIS.

For fun, do cmd iisreset, restart your browser and hit your DNN site.

When prompted, use DOMAIN\username and the Windows user's password, NOT the password you assigned that user in DNN.