Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - HTTPXML API - How to populate forum cookie
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HTTPXML API - How to populate forum cookie

 Post Reply Post Reply
Author
dotcom View Drop Down
Newbie
Newbie


Joined: 11 August 2011
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote dotcom Quote  Post ReplyReply Direct Link To This Post Topic: HTTPXML API - How to populate forum cookie
    Posted: 14 August 2011 at 6:28pm
Is there any documentation or an example anywhere on how to populate a session cookie for  WebWiz using the data returned by the HTTPXML API LoginMemberCookie method?

Thanks,



Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 15 August 2011 at 9:21am
The XML returned by the HTTP XML API is not to create a session cookie but to create the auto login cookie to auto login the user to the forum.

Thed XML returned gives both the cookie key name and the data associated with that key. So you create a cookie using the key name as the cookie name and the data as the data part of the cookie.
Back to Top
dotcom View Drop Down
Newbie
Newbie


Joined: 11 August 2011
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote dotcom Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2011 at 1:50pm
Thanks Bruce, but I am having problems with this cookie. The scenario I am using is as follows. I have a web site and WebWiz installed on two different subdomains of the same domain. When the user logs in on the website I retrieve the cookie data from the HTTP XML API, create a new cookie using it, and adding /setting it to the Response.Cookies collection. I set the cookie domain to the root domain for both webs (domain = .mydomain.com).

Both webs can access the cookie (I'm using FireCookie to examine cookies), but WebWiz does not show the user as logged in.

Have I done something wrong?

Also, in our production scenario, the two webs will not share a domain. How can I create the autologin cookie for the WebWiz domain?
Back to Top
dotcom View Drop Down
Newbie
Newbie


Joined: 11 August 2011
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote dotcom Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2011 at 1:51pm
Again, any sample code for how this is done, would be very useful.


Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2011 at 9:12am
Have a look at auto cookie crated by your web wiz forums installation and then try to create a matching cookie yourself.

It should look something like:-

Name: wwf10sLID
Content: UID=username838hd838jdhd7ehdju7erhdy73tdby
Back to Top
dotcom View Drop Down
Newbie
Newbie


Joined: 11 August 2011
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote dotcom Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2011 at 9:34am
In the end that's what I did. And to get the cookie to be valid for the forum, the forum has to be in the same domain (ie a subdirectory of the main web). Then it all works correctly. There is no way of creating a valid cookie for another domain for security reasons.
Back to Top
 Post Reply Post Reply

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.