Solved

Visual Studio: Password protect a site

Posted on 2008-10-23
3
211 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now