Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Using WWF as a Login Manager
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Using WWF as a Login Manager

 Post Reply Post Reply Page  <12
Author
bhall007 View Drop Down
Newbie
Newbie


Joined: 22 November 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote bhall007 Quote  Post ReplyReply Direct Link To This Post Posted: 31 December 2005 at 2:58am
Sorry for the lack of detail!  Ouch

When I included the above code provided by arpee, it simply showed the code in the web page at the top, and then it showed the rest of the page normally.  The file was a normal html file, that I renamed to .asp and simply inserted the above code at the top.  I assume that I'm missing something else.

Thanks in advance!
Back to Top
arpee View Drop Down
Groupie
Groupie


Joined: 09 November 2004
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote arpee Quote  Post ReplyReply Direct Link To This Post Posted: 31 December 2005 at 11:03am
Show us your code. Did you include the opening <% and closing %> around the code?
 
And there is no need to include the common.asp file if all you're doing is checking if the user is logged on. Session values work without it.
We're all stars. Some just shine brighter than others.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 31 December 2005 at 5:17pm
Just to recap... the file must end in .asp, and you have to have asp code begine with <% and end with %>. Common.asp is not required.

If you're testing it on your own local pc, IIS has to be running.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
bhall007 View Drop Down
Newbie
Newbie


Joined: 22 November 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote bhall007 Quote  Post ReplyReply Direct Link To This Post Posted: 31 December 2005 at 8:56pm
Okay,

Here is the code that I insert at the top of the document:

<%

If Session("IsLoggedOn") <> True then
        Response.Redirect("../forum/insufficient_permission.asp")

        Response.End
    End If

%>


I'm getting a lot further than before.  However, after I actually login to the forum, and then I go back to the page, it still redirects.  I would like the page to allow me to stay on it as long as I am logged in.  I'm using WWF v. 7.9.

Thanks!


Back to Top
bhall007 View Drop Down
Newbie
Newbie


Joined: 22 November 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote bhall007 Quote  Post ReplyReply Direct Link To This Post Posted: 03 January 2006 at 4:37pm
The file is called index.asp, and the code at the top of the page is:
<%

If Session("IsLoggedOn") <> True then
        Response.Redirect("../forum/insufficient_permission.asp")

        Response.End
    End If

%>
It seems to run the code correctly (forwards to the login page).  However, after logging in, it takes you to the main forum (and not the original page that referred me).  But when I try to manually access the original page after I am logged in, it still refers me to the login page instead of granting access like it should.  Any suggestions would be greatly appreciated.

Thanks!
Back to Top
arpee View Drop Down
Groupie
Groupie


Joined: 09 November 2004
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote arpee Quote  Post ReplyReply Direct Link To This Post Posted: 03 January 2006 at 11:50pm
OK, do this....
 
 
Change the code above on your page you want to protect to this...
 
<%

If Session("IsLoggedOn") <> True then

        Response.Redirect("../forum/insufficient_permission.asp")
Session("ReturnPage")=Request.ServerVariables ("PATH_INFO")&"?"&Request.Querystring

        Response.End
Else
Session("ReturnPage")=""
End If

%>
 
 
 
 
 
 
Edit login_user.asp like this (test in red is my addition)
 

'Return to forum homepage

Else

If Session("ReturnPage")<>"" then
Response.Redirect(Session("ReturnPage"))
Else
 
Response.Redirect("/forum.idc?show=login_user_test")
End If

End If

We're all stars. Some just shine brighter than others.
Back to Top
bhall007 View Drop Down
Newbie
Newbie


Joined: 22 November 2005
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote bhall007 Quote  Post ReplyReply Direct Link To This Post Posted: 06 January 2006 at 7:49pm

I inserted the above exact code posted by arpee into the top of the asp file I'm trying to protect.  I also replaced the code in the section of /forum/login_user.asp.  When I access the page, it correctly forwards me to the login page, so I login, and it takes me back to the forum.  I then try to access the original page (the one I'm trying to password protect) after logging into the forum, but it continues to forward me to insufficient_permission.asp (and shows me logged into the forum).

Objectives:

1) After logging in on the insufficient_permission.asp page, then allow access to the original referring page.

2) After logging into the forum on the insufficient_permission.asp page, redirect back to the original referring page. (could live without this)

Thanks in advance!

Back to Top
arpee View Drop Down
Groupie
Groupie


Joined: 09 November 2004
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote arpee Quote  Post ReplyReply Direct Link To This Post Posted: 08 January 2006 at 12:54pm
bhall - I'm sorry I forgot one very important piece of code.
 
You need to add Session("IsLoggedOn") = True to the login_use.asp page, like this:
 

'Return to forum homepage

Else

Session("IsLoggedOn") = True
If Session("ReturnPage")<>"" then
Response.Redirect(Session("ReturnPage"))
Else
 
Response.Redirect("/forum.idc?show=login_user_test")
End If

End If

 
We're all stars. Some just shine brighter than others.
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.