473,738 Members | 3,854 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 1482
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
3551
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
3345
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
1384
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
1063
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
1551
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
2016
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
4568
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
2928
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
8968
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
8787
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
9473
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...
0
9334
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8208
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...
0
6053
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
4569
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...
0
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2193
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.