473,698 Members | 2,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SetAuthCookie works, but our cookies aren't being written - HELP

All

We recently started writing a couple encrypted values to the user's cookie using FormsAuthentica tion.Encrypt. Such as:
Dim tmpTicket1 As New FormsAuthentica tionTicket(1, "TEST", Date.Now, Date.Now.AddMin utes(60), False, "Boom1")
Dim tmpResults1 As String = FormsAuthentica tion.Encrypt(tm pTicket1)
Response.Cookie s.Add(New HttpCookie("TES T", tmpResults1))

And then we are reading it like:
Request.Cookies ("TEST")

BUT - we are noticing that in some cases, people who *do* accept session cookies (confirmed because their cookie session works and FormsAuthentica tion.SetAuthCoo kie works) do *NOT* accept our non persistant cookie. The frustrating thing is that we cannot recreate the issue, so I grasping at straws.

Is there anything glaringly wrong with the code listed above? Further, how exactly is ASP.NET setting the cookie through SetAuthCookie that sticks, but ours don't stick?

Thanks!

Tyson
Nov 18 '05 #1
1 1478
I have the same Problem.

If you find an answer let me know please!

"Tyson Brown" <ty************ ****@sbcglobal. net> wrote in message
news:86******** *************** ***********@mic rosoft.com...
All,

We recently started writing a couple encrypted values to the user's cookie using FormsAuthentica tion.Encrypt. Such as: Dim tmpTicket1 As New FormsAuthentica tionTicket(1, "TEST", Date.Now, Date.Now.AddMin utes(60), False, "Boom1") Dim tmpResults1 As String = FormsAuthentica tion.Encrypt(tm pTicket1)
Response.Cookie s.Add(New HttpCookie("TES T", tmpResults1))

And then we are reading it like:
Request.Cookies ("TEST")

BUT - we are noticing that in some cases, people who *do* accept session cookies (confirmed because their cookie session works and
FormsAuthentica tion.SetAuthCoo kie works) do *NOT* accept our non persistant
cookie. The frustrating thing is that we cannot recreate the issue, so I
grasping at straws.
Is there anything glaringly wrong with the code listed above? Further, how exactly is ASP.NET setting the cookie through SetAuthCookie that sticks, but
ours don't stick?
Thanks!

Tyson

Nov 18 '05 #2

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

Similar topics

20
3544
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
2
3343
by: Amit D.Shinde | last post by:
Hello Experts.. I need some help regarding cookies and session objects and also global.asa file I am creating one cookie when a user logs in on my website. The cookie stores the login name of the user. I want that cookie should get deleted when user closes the browser without signing out. I think it is done in global.asa file . But i don;t know how to do it?
2
1381
by: Ian Sedwell | last post by:
Hi guys I've come across a problem with cookies. It seems that if one attempts to save several cookies in quick succession and then read them back again, you may attempt to read a cookie that has not yet been saved from the first operation. I assume that this is because JavaScript via the browser hands the job over to the OS and then merrily proceeds upon its way. As it happens, I solved the problem by rewriting my code to use one...
0
1061
by: Jason Shohet | last post by:
I need a simple cookie to be written from dos commands (a batch file), and go into the cookies folder, to be a textfile that is easily readable -- not an encrypted thing in the index.dat file (which i think is where .NET cookies go?). Then I want to read from that cookie, in a .NET app, later on. My thinking today was to try a js cookie, since .NET cookies are too difficult to write (need Interop etc). Unfort, when I write a js...
1
1547
by: Strange Cat | last post by:
Hi everyone! I have a weird problem with FormsAuthentication. I have an app that works just fine with FormsAuthentication. The user requests the homepage, he is redirected to login page, then enters valid username and password that are checked versus a db table, if the info is ok i execute SetAuthCookie(xxx, False) then i open a new window which displays the home page, all is working fine...
7
2010
by: Marcus | last post by:
I know that when you start a session in PHP, the "cookie" it creates is not the same as those that are stored in your browser's temp folder, and instead is kept in RAM. I am confused because in every session tutorial I have ever read, the author invariably mentions the 2 main ways of propagating sessions - through cookies and appended to the URL. The author also almost always talks about the method being dependent on the user's...
1
4567
by: Alan Silver | last post by:
Hello, I have a site protected by forms authentication, and when the user logs in, I do the following... FormsAuthentication.SetAuthCookie(txtUsername.Text, chkRemember.Checked); where chkRemember is an <asp:CheckBox> control. If this is checked, then it should save the user's info in a cookie and log them in automatically next time.
0
1116
by: mavrick_101 | last post by:
I have a login page and after validating user credentials I set the FormsAuthentication.SetAuthCookie(username,false); and then redirect the user to a different page. This works often but some times it doesn't work. I checked the cookies for the sessions when it fails and the resulting page shows .ASPXAUTH cookie missing. Whats going on? I have no clue :( Any help.
2
2924
by: Cirene | last post by:
FormsAuthentication.SetAuthCookie works fine in IE7, but not in IE6. Any idea why? Any alternative to FormsAuthentication.SetAuthCookie? Here's my code: FormsAuthentication.SetAuthCookie(Convert.ToString(Request("lexusername") & ""), True)
0
8680
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
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9169
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
8899
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
7738
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
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
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.