Print Page | Close Window

passing username out of forum into asp.net pages.

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=24443
Printed Date: 30 March 2026 at 4:12am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: passing username out of forum into asp.net pages.
Posted By: richgsi
Subject: passing username out of forum into asp.net pages.
Date 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?



Replies:
Posted By: djurob
Date Posted: 18 September 2007 at 7:46pm
sounds great, I'm definately interested


Posted By: Scotty32
Date 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 - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: richgsi
Date 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 - 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



Posted By: richgsi
Date Posted: 18 September 2007 at 9:03pm
as for external login boxes. cant remember what i did i will look it out and post


Posted By: megetron
Date Posted: 18 November 2007 at 6:17pm

Is this well secured?

what are the known issues with the existing browsers?


Posted By: StarDust
Date 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.


-------------
http://board.ebizbd.net/">Tips, mods and skins for WWF v9.x


Posted By: megetron
Date 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.


Posted By: StarDust
Date Posted: 20 November 2007 at 4:21am
Can you be elaborate?

How do you extract application vars and session vars from ASP into .net

-------------
http://board.ebizbd.net/">Tips, mods and skins for WWF v9.x


Posted By: WebWiz-Bruce
Date Posted: 20 November 2007 at 8:45am
This is a totally insecure way of doing it by passing a cookie, as anyone can easily create a cookie on their own machine containing the username of the member they want to login as.

If you are wanting to integrate Web Wiz Forums into ASP.NET, PHP, pages, or other applications then you are best off waiting for version 9.5 of Web Wiz Forums.

Version 9.5 will have an API that you can run commands against Web Wiz Forums from any application using HTTP POST or GET, it will then return XML result which can be parsed, and you will be able to use for things like login, logout, add new member, and many other methods will be included.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: StarDust
Date Posted: 20 November 2007 at 10:01am
-boRg-

You are so great! Thank you very much for the v9.5 API!

WWF will be just boundless.


-------------
http://board.ebizbd.net/">Tips, mods and skins for WWF v9.x



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net