Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - passing username out of forum into asp.net pages.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

passing username out of forum into asp.net pages.

 Post Reply Post Reply Page  12>
Author
richgsi View Drop Down
Newbie
Newbie


Joined: 18 September 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote richgsi Quote  Post ReplyReply Direct Link To This Post Topic: passing username out of forum into asp.net pages.
    Posted: 18 September 2007 at 11:13am
I have made a way of intergrating the forum usernames into asp.net pages etc for use on other parts of your sites such as external toolbars/gallerys etc or even for external login boxes.
 
anyone interested?
Back to Top
djurob View Drop Down
Newbie
Newbie


Joined: 04 September 2007
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote djurob Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2007 at 7:46pm
sounds great, I'm definately interested
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2007 at 8:33pm
from past discussions, i think that ASP and ASP.Net cannot read each others cookies/sessions which would mean you cant stay logged in.

though i cant be 100% sure.
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
richgsi View Drop Down
Newbie
Newbie


Joined: 18 September 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote richgsi Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2007 at 9:02pm

in login_user_test.asp below lines:

'Logged in cookie test

If strLoggedInUserCode = "" Then blnLoggedInOK = False

add

Response.Cookies("userasp")=strLoggedInUserName

in log_off_user add after lines

'Clear the forum cookie on the users system so the user is no longer logged in

clearCookie()

Call saveSessionItem("UID", "")

Call saveSessionItem("AID", "")

add following line:

Response.Cookies("userasp")=""

in includes/setup_options_inc.asp make it as below

'Set the Cookie Path

'If you have issues with cookies for your users you may want to change the path set for your cookies

Dim strCookiePath

'strCookiePath = Left(Request.ServerVariables("HTTP_URL"), InstrRev(Request.ServerVariables("HTTP_URL"), "/"))

strCookiePath = "/" 'Uncomment this line if your forum has issues with cookies

From an asp.net aspx you can call the cookie as below

Request.Cookies("userasp").value

working example at http://www.wsoc.co.uk  

the top menu bar is an aspx .net page which has read in the cookie created by the forum.

hope that helps.

I used the new cookie for the gallery on the site which i wrote in aspx.

I have only tested this on v9



Edited by richgsi - 18 September 2007 at 9:03pm
Back to Top
richgsi View Drop Down
Newbie
Newbie


Joined: 18 September 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote richgsi Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2007 at 9:03pm
as for external login boxes. cant remember what i did i will look it out and post
Back to Top
megetron View Drop Down
Groupie
Groupie


Joined: 20 September 2004
Status: Offline
Points: 147
Post Options Post Options   Thanks (0) Thanks(0)   Quote megetron Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2007 at 6:17pm

Is this well secured?

what are the known issues with the existing browsers?
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2007 at 6:37pm
Forgive my ignorance but isn't ASP session and ASP.NET session are different? How can an app be secured only depending on the cookie?

I guess a good amount of coding will be required to integrate WWF into any ASP.net app.
Back to Top
megetron View Drop Down
Groupie
Groupie


Joined: 20 September 2004
Status: Offline
Points: 147
Post Options Post Options   Thanks (0) Thanks(0)   Quote megetron Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2007 at 6:59pm
I forgive you :)
I think that the solution here is just a basic solution. in it we can display name of the user in the .NET pages...sometimes it is just good enough. so, it won't be wise passing passwords to .NET I guess, but all the rest seems like no harm can be done.
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.