How to enable Windows Authentication for DNN

Recently I was working on a DNN portal that was restricted to intranet view only because of it being in development stage. We did not want to open the access to publc yet. So I had IP restrictions in place so only internal network access is allowed. When it came time to do the demo for external client, I ad to open up the access to DNN portal for public access. One option you have is to add IP address in access restriction list and allow it to access it. But lot of time you may run into external users who do not have a fixed IP address. And this is more of a case for mobile users where IP addresses change every single time you get disconnected and connected. So the solution you can use is to enable windows authentication on your portal and create an account for user(s) who want to view it from outside the network.

Enabling windows authentication for a DNN portal is no different than doing it for any other ASP.Net application. Your first instinct is that you can change authentication type in web.config of DNN application. No, that is not what you want to do because then you will not be able to use your DNN membership provider that works off of the database. Here are steps that you will need to follow to use mixed Windows and Forms authentication for DNN portal.

  • Start IIS and click on your DNN portal web site and click on Authentication tab or icon.

  • Disable anonymous authentication and Enable windows authentication. On IIS7 and higher, your UI may look as below.

    windows authentication in iis

  • Next step is very important. Since DNN requires full permission set on the physical folder where DNN portal is installed, you will have to make changes to the security on that folder. Give user(s) or group(s) the required rights on the folder. Otherwise you will end up with 401 - Access Denied even after you enter valid windows credentials.

comments powered by Disqus

Blog Tags