473,322 Members | 1,699 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,322 software developers and data experts.

How to store session ID without cookies and without "Cookieless=True"

Hi -

I don't want to rely on my users having cookies enabled.

If I use Cookieless=True it of course mangles the urls which means there is
no browser caching of the pages, so it is slow.

What are the other options to use to be able to store a small amount of
session data? I know it can be done because, for example,
www.discountasp.net's site doesn't use cookies or cookie-munging, but it
works just fine to remember my login throughout the site.

Thanks for all input,

Paul.
Nov 19 '05 #1
4 2923
> What are the other options to use to be able to store a small amount
of session data? I know it can be done because, for example,
www.discountasp.net's site doesn't use cookies or cookie-munging, but
it works just fine to remember my login throughout the site.


What makes you think it's not using cookies? I just ran a test with and without
cookies and I must enable cookies for their site to login.

-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #2

You have three ways:
1. Store session ID in cookie file
2. Store Session ID in the URL (for example,
mysite.com/HFFKSJ3F35R4W46HR435YFS/myFolder/myPage.aspx
3. Store Session ID in QueryString (for example,
mysite.com/myFolder/myPage.aspx?SID=HFFKSJ3F35R4W46HR435YFS

Nothing more. You should select :)

Gaidar

"Paul W" <qq*@qqq.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi -

I don't want to rely on my users having cookies enabled.

If I use Cookieless=True it of course mangles the urls which means there
is no browser caching of the pages, so it is slow.

What are the other options to use to be able to store a small amount of
session data? I know it can be done because, for example,
www.discountasp.net's site doesn't use cookies or cookie-munging, but it
works just fine to remember my login throughout the site.

Thanks for all input,

Paul.

Nov 19 '05 #3
But how to implement storing sessionid in QueryString? IF I have a
sessionID passed through QueryString, i can't initialize session with
this ID.

Chiky

gaidar wrote:
You have three ways:
1. Store session ID in cookie file
2. Store Session ID in the URL (for example,
mysite.com/HFFKSJ3F35R4W46HR435YFS/myFolder/myPage.aspx
3. Store Session ID in QueryString (for example,
mysite.com/myFolder/myPage.aspx?SID=HFFKSJ3F35R4W46HR435YFS

Nothing more. You should select :)

Gaidar

"Paul W" <qq*@qqq.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi -

I don't want to rely on my users having cookies enabled.

If I use Cookieless=True it of course mangles the urls which means there
is no browser caching of the pages, so it is slow.

What are the other options to use to be able to store a small amount of
session data? I know it can be done because, for example,
www.discountasp.net's site doesn't use cookies or cookie-munging, but it
works just fine to remember my login throughout the site.

Thanks for all input,

Paul.


Nov 19 '05 #4
>If I use Cookieless=True it of course mangles the urls which means there
is no browser caching of the pages, so it is slow.


The browser WILL still cache the pages. The session ID remains the same
all the time as long as you don't force it to create a new session by
linking to a page without including a session ID.

The fact that the URL becomes:

/(bktylw45s3f14345r3w4lx2j)/catalogue.aspx

...is no different to if it was:

/catalogue/catalogue.aspx

It's just a folder name and doesn't affect client side caching at all.

If I were you, I'd use cookieless=true.

Just ensure that your links in the website start with "~" rather than
"/" or otherwise you'll create a new session. ~ gets resolved to the
correct URL for the current session if you pass it through
Server.ResolveUrl(). You don't need to call ResolveUrl manually for most
internal functions that take URLs as arguments.

eg Response.Redirect("~/basket.aspx");

You might also have to convert some hard coded links (HTML) to
asp:HyperLinks so you can use the "~" and thus avoid creating new sessions.

Note that ~ doesn't work in <a> tags. It's a server side macro only.

Hope this helps.

Nick...
Nov 19 '05 #5

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

Similar topics

3
by: Carpe Diem | last post by:
Hello I have an aspx page that loses Session("user") value after a few minutes even after I set <sessionState mode="InProc" cookieless="false" timeout="300"> in web.config and wrote function...
4
by: moondaddy | last post by:
in the webconfig I set: <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="true"...
4
by: Siang Hwee | last post by:
Hi. I am facing some problem in Asp.net. I am developing a payroll application currently. This is a web-based application. User need to click on "Process" button in order to process the payroll...
13
by: Water Cooler v2 | last post by:
What do you mean by a cookieless session state? When you set the sessionState section's cookieless attribute to true in the web.config file, what does that mean? I read this...
0
by: Daatmor | last post by:
Hi, I've worte a program that will grab the html file content from web server. It's work ...
4
by: samadams_2006 | last post by:
Hello, I have a peculiar problem that I'm hoping someone can help me out with. I have a simple enough Web Application written in VB.Net via Visual Studio 2003. It simply displays a Web Form...
3
by: =?Utf-8?B?bWdvcHBlcnQ=?= | last post by:
I'm having an issue with using web services in a web application marked with session cookieless attribuet set to "AutoDetect". My real life scenario is too complex to lay out but here's my...
1
by: Rahul | last post by:
Hi, How to configure and user asp.net membership controls? I have all the required defaults in the database tables. I get the connection not found error.. Below is my web.config
4
by: R.A.M. | last post by:
Hello, I am writing my first ASP.NET application (I use .NET 2.0, Visual Web Developer 2005 Express Edition and SQL Server 2005 Express Edition). The application builds successfully but when I try...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.