By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

cookie nightmares

P: n/a
GOAL: a .NET cookie, in a user's cookie folder, contains the machinename of
the current machine the user is on. Various .NET apps will look at that
cookie file to determine if the logged in user ( for that .NET app) is
allowed to access that machine. (In a db we have the machine that ea. user
can log onto).

HOW WE ARE TRYING TO DO IT: An echo command in a startup routine (when
the computer is logged into) writes the text to the appropriately named
cookie file. That startup routine knows the user, and the machine. So its
easy to write a file in the way that .NET needs a cookie to be, named
appropriately and put in that user's cookie folder.

RESULT: The cookie looks perfect, and is named correctly, and is placed
correctly in the cookie folder for that user. But .NET can't read it. I
believe it has to do with hidden characters. ie, take a look at a .NET
cookie. After the second 'e' in ClientInfoCookie, there is a hidden
character. You'll notice it by spacing over, it spaces twice at that point.
Also, after 'localhost/' there's a hidden character, and before the first
'*' there's a hidden character. But the Echo command that the network
engineer is running, strips out hidden characters. Could this be why we
can't read the cookie? Why the heck are those things there anyway?

Anyone have any experience doing what I'm trying to do? An easier way
perpaps. Maybe I can use a javascript cookie, and have the machine name &
currentuser placed in there. Can .NET read a JS cookie perhaps...
Desperation here :)

TY Jason Shohet
Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.