This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > FrontPage Programming > February 2005 > How do I restrict access to my website - require a password etc.?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How do I restrict access to my website - require a password etc.?
Liquor Dealer

2005-02-17, 11:19 pm

I need to be able to limit access to my site by requiring a password or
membership. How do I make it accessable only to those who have permission?
Tom Pepper Willett

2005-02-17, 11:19 pm

Password Protect Part of a Web:
http://support.microsoft.com/defaul...kb;en-us;301554
--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/of...etid=FX01085802
FrontPage 2003 Product Information:
http://www.microsoft.com/office/fro...fo/default.mspx
Understanding FrontPage:
http://msdn.microsoft.com/office/un...ding/frontpage/
===
"Liquor Dealer" <Liquor Dealer@discussions.microsoft.com> wrote in message
news:298B4003-0E9B-4B3D-A660-435D07BEE03D@microsoft.com...
|I need to be able to limit access to my site by requiring a password or
| membership. How do I make it accessable only to those who have
permission?


Marcello do Guzman

2005-02-20, 6:30 pm

Try Websie Login. Here's the link

http://www.websitelogin.com/

I've never used the service myself, because my hosting company does
not support this software.


Marcello



On Thu, 17 Feb 2005 17:15:06 -0800, "Liquor Dealer" <Liquor
Dealer@discussions.microsoft.com> wrote:

>I need to be able to limit access to my site by requiring a password or
>membership. How do I make it accessable only to those who have permission?


Trym Bagger

2005-02-23, 6:45 pm

Your security should be based on a combination of checking against a list of
users in a table, and then a Session variable, which is checked on all the
pages you want to protect. You could do something along the lines of this:

Login.asp:

<%
Dim UserName
Dim Password
UserName = Request.Form("Username")
Password = Request.Form("Password")
If Len(UserName) > 0 Then
msql = ("SELECT Username, Pw FROM users WHERE Usuario='" & UserName & "'
AND Pw='" & Password & "'")
Set RS = Conn.Execute(msql)
If RS.EOF Then
ErrorMessage = "<P><font color=""red"">Usuario o contraseņa
incorrecto</font></P>"
RS.Close
Conn.Close
Set RS = Nothing
Set Conn = Nothing
Else
RS.Close
Conn.Close
Set RS = Nothing
Set Conn = Nothing
Session("SecurityID") = "askljhsdfvljhdsfgkjlh3tkljasdlkskuh"
Response.redirect "yourpage.asp"
End If
End If
%>
<Form Method="Post" Action="login.asp">
User name: <Input Name="Username" size="15"><br>
Password: <Input Type="Password" Name="Password" size="15"><br>
<Input Type="submit" Value="Enter" Name="Login">
</Form>

(If you wan't more security, you should another function which generates
random Session variables for each user.)

On yourpage.asp (and any other page you want to protect, you should add the
following code at the top:

<%
If Session("SecurityID") <> "askljhsdfvljhdsfgkjlh3tkljasdlkskuh" Then
Response.Redirect "editweb.asp"
End If
%>

If you want any further assistance do not hestitate to contact me.

Cheers,

Trym Bagger
www.lacanela.com

"Liquor Dealer" <Liquor Dealer@discussions.microsoft.com> wrote in message
news:298B4003-0E9B-4B3D-A660-435D07BEE03D@microsoft.com...
>I need to be able to limit access to my site by requiring a password or
> membership. How do I make it accessable only to those who have
> permission?



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews