To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
The ASP.NET Chart Control
Article :: Introduction to SharePoint Development in Visual Studio 2010
Part 10 of the Visual Basic .NET 2010 Express Tutorial Complete!
How to Use the Visual Studio Code Analysis Tool FxCop
Article :: Interview with Andrei Alexandrescu (Part 3 of 3)



Go Back   VBForums > VBForums CodeBank > CodeBank - ASP / ASP.NET

Reply Post New Thread
 
Thread Tools Display Modes
Old Jul 30th, 2004, 07:50 AM   #1
JMvVliet
Hyperactive Member
 
JMvVliet's Avatar
 
Join Date: May 01
Location: Papendrecht, Netherlands
Posts: 310
JMvVliet is an unknown quantity at this point (<10)
How to use Forms login for a whole ASP .NET Web App

Create a web project. Add a web.config file. change the following line:

<authentication mode="Windows"/>

to

<authentication mode="Forms">
<forms name="PieperWEB" loginUrl="Login.aspx" protection="All" timeout="60" />
</authentication>


also change the line:

<authorization>
<allow users="*" /> <!-- Allow all users -->

<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>


to

<authorization>
<deny users="?" /> <!-- Deny unauthorized users -->

<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>


Now, add a page, name it Default.aspx, then, add a page, name it Login.aspx.

Before you can use default.aspx, you ALWAYS must login via Login.aspx.

Enjoy!
JMvVliet is offline   Reply With Quote
Reply

Go Back   VBForums > VBForums CodeBank > CodeBank - ASP / ASP.NET


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:34 PM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.