Solved

Visual Studio: Password protect a site

Posted on 2008-10-23
3
213 Views
Last Modified: 2013-11-26
I have a web application created using Visual Studio 2008.  I want users to be denied access to the site if they are not logged in first.  I want the user trying to access a page without logging in to be redirected to the login page.
0
Comment
Question by:sproctor722
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
brwwiggins earned 125 total points
ID: 22789535
<authentication mode="Forms">
<forms name="AppLogin" loginUrl="login.aspx" path="/" protection="All" timeout="60"></forms>
</authentication>
<authorization>
      <deny users="?" />
 </authorization>
0
 
LVL 20

Expert Comment

by:brwwiggins
ID: 22789559
sorry, hit submit on wrong windows. The above should go in your web.config
0
 

Author Closing Comment

by:sproctor722
ID: 31509354
You're fantastic!  Thank you!!!!!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question