Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Can anyone tell me how to store Session variables?

  Asked By: Jered    Date: Nov 21    Category: Sharepoint    Views: 1805

Can anyone tell me how to store Session variables in custom web
application which is running under WSS v3 site?



3 Answers Found

Answer #1    Answered By: Jaime Sims     Answered On: Nov 21

Can anyone tell me how to store  Session variables  in custom  web
application which is running  under WSS v3 site?

Answer #2    Answered By: Ashley Robbins     Answered On: Nov 21

Session state is turned off by default. What are you trying to store?

Answer #3    Answered By: Kelly Fowler     Answered On: Nov 21

I'm creating a custom  web app under _layouts folder. In here, in
webForm1, I'm getting the current user's name details and passing it
to AD(in order to get username and password details of that user to
another site). After this I'm trying to store  this(the received
username and password from AD) as session  varibles. So that the
WebForm2 will take this details and store it in the form of
<root><Row login='<%=Session("ID")%>' password='<%=Session
("PASSWORD")%>' /></root>

Initially I recived an error saying as
"System.Web.HttpException: Session state can only be used when
enableSessionState is set to true, either in a configuration file or
in the Page directive. Please also make sure that
System.Web.SessionStateModule or a custom session state module is
included in the \\ section in the application configuration. at
System.Web.UI.Page.get_Session() at AppLogin.GetUserDet()"

Then I added EnableSessionState tag under Web.config file. But after
I receiving an error as like:

Sections must only appear once per config file. See the help topic
<location> for exceptions. (C:\Program Files\Common Files\Microsoft
Shared\Web Server Extensions\12

What is wrong with this? Am I missing something here? What is the
solution for this?

Didn't find what you were looking for? Find more on Can anyone tell me how to store Session variables? Or get search suggestion and latest updates.