Mobile app version of vmapp.org
Login or Join
Sarah324

: How do I get Windows Server 2012 to prompt me for credentials when I go to a restricted subfolder of my site? The "Users" group has read access to my entire website so the public can browse

@Sarah324

Posted in: #Security #Server #Windows

The "Users" group has read access to my entire website so the public can browse my site. Now, I have created an "admin" subfolder which I do not want the public to have access to.

So in the security settings for the folder I specifically denied everything to the "Users" group, and so now when I browse to mysite.com/admin I get a "401 Unauthorized" error.

I guess this is kinda good, except how do I get it to prompt me for credentials so I can login and actually see the pages in that folder?

In Server 2003 this used to work automatically, but in 2012 something has changed. What's the trick?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sarah324

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shakeerah822

In IIS, enable Basic Authentication.

If it's not listed, then go to Server Manager and install Basic Authentication through "Add Roles and Features". (it's listed under "Web Server (IIS) / Web Server / Security / Basic Authentication").

Then create a web.config file inside the folder you want to secure with the following code:

<configuration>
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="false" />
<basicAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</configuration>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme