473,796 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 942

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

Similar topics

1
11073
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 '//Read cookie... ExpDate = Request.cookies("Propsect") Response.write "Prospect expiry date: " & expDate & "<br>"
5
3316
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 document.cookie variable combine all cookie key=value pairs? All of the examples I've seen discuss referencing a specific cookie. I don't see how this is done. Cookies are usually named by the domain. If I want to reference a specific cookie, do I...
1
6719
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 simply pass the values in a cookie to the querystring that would be even easier, but from what I've been able to tell, cookie values can't be passed to a querystring. I'm sure the answer will help alot of others who are using this script, and would...
2
1293
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 cookie? setcookie( "username", $username, time()+3600*24*30*12*5, "/", www.mydomain.com, 0 ); SK
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10459
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10187
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10018
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6795
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5446
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.