473,379 Members | 1,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Creating a password page

I want my ASP.NET application to be password-controlled. How do I prevent
page access without the user having gone to the password page first and
having logged in?

Does anyone know of any articales on this at any of the popular ASP.NET
sites?

Many thanks.
Nov 19 '05 #1
6 1039
http://msdn.microsoft.com/library/de...plications.asp

"Andrew Chalk" wrote:
I want my ASP.NET application to be password-controlled. How do I prevent
page access without the user having gone to the password page first and
having logged in?

Does anyone know of any articales on this at any of the popular ASP.NET
sites?

Many thanks.

Nov 19 '05 #2
Look for 'Forms authentication' in the msdn.

"Andrew Chalk" wrote:
I want my ASP.NET application to be password-controlled. How do I prevent
page access without the user having gone to the password page first and
having logged in?

Does anyone know of any articales on this at any of the popular ASP.NET
sites?

Many thanks.

Nov 19 '05 #3
In the web.config file, you would have something like this, which would
redirect a user trying to login to the login.aspx page. You'll need to
create your authenication code on the login.aspx page. If you want a
complete solution, search for asp.net forms authentication and
something will probalby pop up.

<authentication mode="Forms">
<forms name="MyForm" loginUrl="login.aspx"/>
</authentication>

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

Nov 19 '05 #4
In the web.config file, you would have something like this, which would
redirect a user trying to login to the login.aspx page. You'll need to
create your authenication code on the login.aspx page. If you want a
complete solution, search for asp.net forms authentication and
something will probably pop up.

<authentication mode="Forms">
<forms name="MyForm" loginUrl="login.aspx"/>
</authentication>

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

Nov 19 '05 #5
Thanks everyone for your help! I eventually used the ASP.NET tutorial
http://www.dotnetjunkies.com/quickst...yoverview.aspx

which had a simple example that I adapted.

Regards,

Andrew
"Andrew Chalk" <ac****@magnacartasoftware.com> wrote in message
news:up*************@TK2MSFTNGP15.phx.gbl...
I want my ASP.NET application to be password-controlled. How do I prevent
page access without the user having gone to the password page first and
having logged in?

Does anyone know of any articales on this at any of the popular ASP.NET
sites?

Many thanks.

Nov 19 '05 #6
Thanks all. I eventually referred to the topic on forms authentication in
the MS ASP.NET tutorial.

Regards,

Andrew
"Andrew Chalk" <ac****@magnacartasoftware.com> wrote in message
news:up*************@TK2MSFTNGP15.phx.gbl...
I want my ASP.NET application to be password-controlled. How do I prevent
page access without the user having gone to the password page first and
having logged in?

Does anyone know of any articales on this at any of the popular ASP.NET
sites?

Many thanks.

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Grahammer | last post by:
For some reason I am getting an error when trying to open a recordset on an Access database on my Win2K3 machine from my INDEX.ASP page, but the same code accesses the database fine when coming...
0
by: collie | last post by:
Hi, I have an asp page where i created cookies-for admin and for user. The aspx page reads these cookies. Everything seems to work fine but now i have to create a new cookie if cookie has...
0
by: Chumley the Walrus | last post by:
UPon a user succesfully logging in, i'm having trouble creating a "log out" link on a protected page so that users can end their session (i'm more used to classic asp with this). Below is my...
1
by: sharp2037 | last post by:
Hi Everyone, I am working on an ASP.net application and I have a homepage to which everyone visits of course and on that front page I have a user ID and password box and a login button. What...
15
by: David Thielen | last post by:
Hi; My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a subdirectory to display as part of the created page. However, the bitmap will not display due to a security violation. ...
0
by: CrimeMaster | last post by:
Hi Before this i have send a request about WINHHTP help.But coulnt find any answer till now except one in which may be the Replier coulnt understand the problem ,sorry for that. Now i m using...
5
by: Dan | last post by:
Hi, I use the <asp:CreateUserWizardcontrol for creating memberusers. In that windows, one must provide an emailaddress. My question is: how can an user later change his emailaddress? Thanks...
2
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: ...
6
by: pek | last post by:
I have read a lot of tutorials on how to create a login mechanism (a lot of which I found really useful). None of them however explain how do you check if the user is or is not in fact logged in. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.