473,396 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

cookie value being garbled.

Hi,

I have a legacy VB6 webclass app that has been directly ported
to VB.NET. My .NET webclass infrastructure works in more or
less the same way but is now specific to my app and not the
generic like the original MS version. This is all implemented in
1 DLL using a series of HttpHandlers and HttpModules.

Anyhow, I need to do manual authentication ticket handling,
which in this case I use an MD5 hash for.

Situation/Problem:
When a user visits the site they are automatically logged in as
an appropriate langauge guest, i.e. English guest, French guest
based on browser settings. They can then browse the site etc...
Each request to the site refreshes the ticket (stored in a cookie).
This all works great and they can browse as much as they want.

HOWEVER.... if you login and hence get a new ticket all
together then the next request after the login OK page receives
the ticket cookie in what appears to be URL encoding.
I decode this using the built in ASP.NET methods but this
has the side-effect of corrupting the MD5 hashed part of the
ticket, because when checking it's validity it fails.

I tracked the progress of requests and found that everything is
okay up to and including the end of the processing of the
login OK page. The next request which comes in through
a HttpHandler factory (which does nothing except work out
what class it needs to instantiate and set running) the cookie
is mangled.

Any ideas as to why the cookie would be fine for all requests
when auto-logged in as a guest but then get screwed after login
would be much appreciated.

P.S I don't do anything special when logging in, I just check
the user/pwd against DB and say either yes (authenticate with
a new ticket) or no.

Regards,
Peter
Nov 18 '05 #1
0 927

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
How does one read and write the cookie expiration date. At the moment my code is returning a value BUT a garbled value: '//Write cookie... Response.Cookies("Propsect").Expires = Date() + 1 ...
5
by: brettr | last post by:
When I reference document.cookie, there is a long string of key=value; pairs listed. I may have 100 hundred cookies on my hard drive. However, most only have one key=value pair. Does the...
1
by: CR1 | last post by:
I found a great cookie script below, but don't know how to make it also pass the values sent to the cookie, to a querystring as well for tracking purposes. Can anyone help? If there was a way to...
2
by: RandyTh | last post by:
I am trying to set the japanese characters in this useremail cookie. The thing is sometimes the $HTTP_COOKIE_VARS returns me a garbled string; Do I have to encode first before I save it in the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.