Welcome to HostingForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Session Object problem

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Author Message
lpdumoulin

External


Since: Oct 13, 2003
Posts: 1



(Msg. 1) Posted: Mon Oct 13, 2003 2:14 pm
Post subject: Session Object problem
Archived from groups: microsoft>public>inetserver>iis (more info?)

Hi, I have the following problem. I use the Session object
in my aspx.


Session.Add("Campaign", null);
..
..
..
Session["Campaign"] = camp;
Response.Redirect("DataEntry.aspx");


In DataEntry.aspx I try to get back the value:

this.camp = (Campaign) Session["Campaign"];


It work fine when I test it from my development
environment. But I moved my web site in production and now
I get the "Object reference not set to an instance of an
object" error when I try to get back any value inserted in
the Session object. It' very strange because if I try it
on the prod server with localhost, It work. But if I try
it with the complete URL, I am always getting the error.

Here the session state in my web.config:
<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="false" timeout="20" />


Why my Session objects loose his content when I am using
my web site with the complete URL?

Thanks you

Louis-Philippe Dumoulin

 >> Stay informed about: Session Object problem 
Back to top
Login to vote
timcof

External


Since: Sep 02, 2003
Posts: 912



(Msg. 2) Posted: Thu Oct 23, 2003 12:39 pm
Post subject: RE: Session Object problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Try the asp.net group.

Thank you. I hope this information is helpful.

Tim Coffey [MSFT]

This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.
--------------------
| Content-Class: urn:content-classes:message
| From: "Louis-Philippe Dumoulin" <lpdumoulin DeleteThis @efundraising.com>
| Sender: "Louis-Philippe Dumoulin" <lpdumoulin DeleteThis @efundraising.com>
| Subject: Session Object problem
| Date: Mon, 13 Oct 2003 11:14:49 -0700
| Lines: 39
| Message-ID: <29bdc01c391b5$e400ed80$a601280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcORteP+2RR2YsUoTeimNrwxV3gHuw==
| Newsgroups: microsoft.public.inetserver.iis
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.inetserver.iis:279424
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.inetserver.iis
|
| Hi, I have the following problem. I use the Session object
| in my aspx.
|
|
| Session.Add("Campaign", null);
| .
| .
| .
| Session["Campaign"] = camp;
| Response.Redirect("DataEntry.aspx");
|
|
| In DataEntry.aspx I try to get back the value:
|
| this.camp = (Campaign) Session["Campaign"];
|
|
| It work fine when I test it from my development
| environment. But I moved my web site in production and now
| I get the "Object reference not set to an instance of an
| object" error when I try to get back any value inserted in
| the Session object. It' very strange because if I try it
| on the prod server with localhost, It work. But if I try
| it with the complete URL, I am always getting the error.
|
| Here the session state in my web.config:
| <sessionState mode="InProc"
| stateConnectionString="tcpip=127.0.0.1:42424"
| sqlConnectionString="data source=127.0.0.1;user
| id=sa;password=" cookieless="false" timeout="20" />
|
|
| Why my Session objects loose his content when I am using
| my web site with the complete URL?
|
| Thanks you
|
| Louis-Philippe Dumoulin
|
|

 >> Stay informed about: Session Object problem 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]