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

ASP.NET Session: Can't store

Hi All,

I have an ASP.NET application deployed under a Web Site in IIS6.0

I have specified session mode as "InProc".

However, all calls to Session[key]= value are failing.

If I set, cookieless = true, then application works fine.

Are there any permission specific requirements to store into Session?

TIA
Pitu
Nov 19 '05 #1
5 1281
Are you getting an error or are they lost when when you access them later?

"Sachin" wrote:
Hi All,

I have an ASP.NET application deployed under a Web Site in IIS6.0

I have specified session mode as "InProc".

However, all calls to Session[key]= value are failing.

If I set, cookieless = true, then application works fine.

Are there any permission specific requirements to store into Session?

TIA
Pitu

Nov 19 '05 #2
It sounds like the browser you are testing your application from is not
allowing cookies. By default, sessions are identified by passing a
cookie to the client when they establish a session with the server,
then subsequent requests to the server include that cookie, which
identifies the session for that client.

If the browser is set to disallow cookies, then it refuses to accept
the session cookie and the client never establishes a session on the
server.

By setting cookieless=true on the server, ASP.NET will now put the
session ID in the querystring (take a took, it's there) which is the
substitute for the session cookie. A request from the browser will
include the session ID and that is parsed by ASP.NET and establishes
the session with the client.

No specific server-side permissions are required to access the Session
object - it's a question of the mechanism for the client to identify
itself with a particular Session on the server.

Mike

Nov 19 '05 #3
They are lost when I try to access them. Because of that my application does
not work and throws the NullReferenceException.
Session.Count is always 0.

"Dave" <Da**@discussions.microsoft.com> wrote in message
news:73**********************************@microsof t.com...
Are you getting an error or are they lost when when you access them later?

"Sachin" wrote:
Hi All,

I have an ASP.NET application deployed under a Web Site in IIS6.0

I have specified session mode as "InProc".

However, all calls to Session[key]= value are failing.

If I set, cookieless = true, then application works fine.

Are there any permission specific requirements to store into Session?

TIA
Pitu

Nov 19 '05 #4
Cookies are allowed.

In fact, same application is deployed on 3 different server. We are just
testing the deployment across different servers.
This problem is only with one server.

If I access the other two applications from my machine they works fine.

"xhead" <xh******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
It sounds like the browser you are testing your application from is not
allowing cookies. By default, sessions are identified by passing a
cookie to the client when they establish a session with the server,
then subsequent requests to the server include that cookie, which
identifies the session for that client.

If the browser is set to disallow cookies, then it refuses to accept
the session cookie and the client never establishes a session on the
server.

By setting cookieless=true on the server, ASP.NET will now put the
session ID in the querystring (take a took, it's there) which is the
substitute for the session cookie. A request from the browser will
include the session ID and that is parsed by ASP.NET and establishes
the session with the client.

No specific server-side permissions are required to access the Session
object - it's a question of the mechanism for the client to identify
itself with a particular Session on the server.

Mike

Nov 19 '05 #5
Sachin,

If you are testing these servers stand-alone, check the IIS settings, Home
Directory, Configuration Button, Options tab that the Sessions are enabled
for the server in question.

If you are testing the app in a web farm, the InProc won't work.

In regards to the Null Object reference, "It is important to remember that
session variables are now objects. Thus, to avoid a run-time error, you
should check whether the variable is set before you try to access it." See
the following for more info:

http://support.microsoft.com/default...b;en-us;307598


"Sachin" wrote:
Cookies are allowed.

In fact, same application is deployed on 3 different server. We are just
testing the deployment across different servers.
This problem is only with one server.

If I access the other two applications from my machine they works fine.

"xhead" <xh******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
It sounds like the browser you are testing your application from is not
allowing cookies. By default, sessions are identified by passing a
cookie to the client when they establish a session with the server,
then subsequent requests to the server include that cookie, which
identifies the session for that client.

If the browser is set to disallow cookies, then it refuses to accept
the session cookie and the client never establishes a session on the
server.

By setting cookieless=true on the server, ASP.NET will now put the
session ID in the querystring (take a took, it's there) which is the
substitute for the session cookie. A request from the browser will
include the session ID and that is parsed by ASP.NET and establishes
the session with the client.

No specific server-side permissions are required to access the Session
object - it's a question of the mechanism for the client to identify
itself with a particular Session on the server.

Mike


Nov 19 '05 #6

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

Similar topics

5
by: Timin Uram | last post by:
Hey! Is there some sort of limit on how much one could store in a session as far as amount of data? Is it advisable to store a LOT of data in the session when a user logs in to save queries to...
15
by: | last post by:
Hi, I want to do things this way: I have a bunch of stuff that I want to keep track of while a user is connected to the site. Maybe 50 little peices of information. So I know I can make 50...
2
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...
3
by: Leon | last post by:
Is it a good idea to load a user username/email and password into session state if you will be validating information against those credential through-out the use of the web application? or is it...
11
by: Vishal | last post by:
Hello, can anybody tell me how I can extend the session expiry time? Is it done via code or via IIS? Sorry I am new and dont know about this.
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
7
by: Mr Newbie | last post by:
I have written a Custom Control Menu. Its fairly simple but it works well enough. In order to simplify things I decided to store the Menu1 custom control in Session. In the page load event below,...
4
by: Nick Gilbert | last post by:
Hi, Is it possible to access the Session of an arbitary user from an aspx page? On an e-commerce site, I am notified of payment success via a callback from the payment server to an ASPX page...
4
by: =?Utf-8?B?YmFzdWxhc3o=?= | last post by:
Hi; I want to store a datatable (or an arraylist) as a session variable but when I try; Session = al_RecNo; I get an error that; "Cannot implicitly convert type...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.