Reply
Passwording my web
Old 04-14-2004, 03:35 PM Passwording my web
Junior Talker

Posts: 3
I have been given the task of building a web page for my company (since I did take a 24 hr. class in Front Page 2 years ago). They are wanting to have a rep-section on the site that is password protected with a database that I can maintain when the reps come and go from there companies. How can I do this. HELPPPPPPPPP!!!
ksjaberjaw is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-14-2004, 10:20 PM
ppedersen's Avatar
Super Talker

Posts: 115
Location: Tampa Bay, FL - USA
Welcome to the club of people who got here (into Web development) by accident!

Can you give us some more details? Is the OS Windows or Linux/Unix? Is the Web Server IIS or Apache (or other)? Is the machine local or remote? If remote, can you work from the desktop (using a program like Terminal Services)?
__________________
Profile (all posts)
Paul Pedersen's Website
ppedersen is offline
Reply With Quote
View Public Profile Visit ppedersen's homepage!
 
Old 04-15-2004, 08:53 AM More info.
Junior Talker

Posts: 3
I am working on Windows XP and it is running from my computer. We are using Pen Publishing and I have no idea what they are. I am using Front Page 2003. I hope this is what you were wanting.
ksjaberjaw is offline
Reply With Quote
View Public Profile
 
Old 04-15-2004, 09:18 AM
Extreme Talker

Posts: 156
Location: Lincoln, UK
If you have admin access to whatever you are hosting the site on, the easiest way would be to put it all in a separate directory and password protect the directory through the admin tool (cpanel or suchlike)
__________________
-------------------------------------------------------------------
www.blackprism.com - Black Prism: Web Design - Corporate Image - Graphic Design
-------------------------------------------------------------------
Tzunami is offline
Reply With Quote
View Public Profile Visit Tzunami's homepage!
 
Old 04-15-2004, 09:19 AM
ppedersen's Avatar
Super Talker

Posts: 115
Location: Tampa Bay, FL - USA
So let me make sure I got this straight. Your Web server is Windows XP ...and it is also your desktop computer ...and is connected to the internet all of the time -OR- You are designing it on your Windows XP with front page.

If the second is the case, what about the Web server (the place you FTP your files to)? If you don't know then post the Web address and I can usually get Web server by typing in the name of a page that doesn't exist. Like this!

The reason that this is important is that IIS and Apache have different ways of dealing with this. By the way, if you are remotely hosting your site on an Apache server, the hosting company usually has an automated way to password protect a directory.
__________________
Profile (all posts)
Paul Pedersen's Website
ppedersen is offline
Reply With Quote
View Public Profile Visit ppedersen's homepage!
 
Old 04-16-2004, 11:06 AM
Junior Talker

Posts: 3
Okay here we go. I have windows xp on my desktop. I am creating the web page on my computer in front page 2003. then publishing it threw a digital cable to pen publishing. the web address is www.webster-engineering.com

when you go to it you will see a section called rep section that is the part that they are wanting to password protect so that they can post information that is only for them while leaving the rest of the site visable to everyone. That is the part that I can not figure out how to do.
ksjaberjaw is offline
Reply With Quote
View Public Profile
 
Old 04-19-2004, 12:37 PM
D.Viddy's Avatar
Average Talker

Posts: 24
Location: Soldotna, Alaska
First off you need to have a login page. The page should have a form on it that accepts a username and password. When submitted, the form information should go to an ASP page for processing. In the ASP page, check the username and password to make sure it's correct. So like this:

processlogin.asp
Code:
<%
form_username = Request.Form("txtUsername")
form_password = Request.Form("txtPassword")

If form_username = "admin" and form_password = "admin" Then
	Session("username") = "admin"
	Session("loggedin") = True

	Response.Redirect "securepage.htm"
Else
	Response.Write "The username or password you have entered are incorrect"
End If
%>
That will do it for processing the login. On the pages you want to be secure. Make a new ASP page then include it at the top of all the pages you want protected. Here is the code for that ASP page:

checklogin.asp
Code:
<%
If Session("loggedin") = False Then
	Response.Redirect "login.htm"
End If
%>
So all the files you will need to complete this are:
login.htm (Has two textboxes on it, one called txtUsername and one called txtPassword, form should be submitted to processlogin.asp)
processlogin.asp *
checklogin.asp *
securepage.asp (This page is your secure page with this line put at the top of it: <!--#include file='checklogin.asp'-->)

I have showed you the asterisked ones. I think you will be able to figure out the other pages because I have told you what you need to have on it.
__________________
-Dylan Vester
D.Viddy is offline
Reply With Quote
View Public Profile Visit D.Viddy's homepage!
 
Old 04-19-2004, 09:17 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Great tutorial D.Viddy. That should get you started, I don't really like the idea of storing username/password right in the asp file though, but it's a good place to start. Ideally this information should be in a database with a one way encryption such as SHA256.

If you can, get your host to password protect a directory for you and stick all your files in there, as Tzunami has mentioned. This is by far the easiest way to go.

ksjaberjaw, sorry.. but you will not be able to use frontpage when working with ASP files. I suggest you pick up a good code editor such as Source Edit and learn to code by hand.
Anacrusis is offline
Reply With Quote
View Public Profile Visit Anacrusis's homepage!
 
Reply     « Reply to Passwording my web
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.15899 seconds with 13 queries