Web Connection
Securing a folder using Custom Authentication
Gravatar is a globally recognized avatar based on your email address. Securing a folder using Custom Authentication
  Carl Chambers
  All
  Nov 10, 2017 @ 04:41pm

I'm thinking of posting the Help docs produced by HTML Help Builder on my site but I want to restrict access to authorized users. I'm using Custom Authentication to secure Process methods but I don't know how to secure a folder.
How can this be done?

Thanks, Carl

Gravatar is a globally recognized avatar based on your email address. re: Securing a folder using Custom Authentication
  Rick Strahl
  Carl Chambers
  Nov 10, 2017 @ 09:12pm

The easiest thing is via Windows Authentication. Just remove the IUSR_ from the access control list (Properties | Security) for the folder, at which point your will be prompted for credentials when you try to access the folder.

Make sure you enable Windows Authentication for either that folder or your application's site/virtual.

Alternately you can also use ASP.NET security by using the <Location> tag and using FormsAuthentication with user credentials stored in the config file.

Here's a really old article that shows how you can do that. It'll take a little work, but the nice thing is once you have this you can easily secure other resources using the same approach.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Securing a folder using Custom Authentication
  Carl Chambers
  Rick Strahl
  Dec 5, 2017 @ 08:04am

Thanks, Rick.

© 1996-2024