Session state can only be used when enableSessionState is set to true Error

R

Rick

I am getting a "Session state can only be used when enableSessionState is
set to true" error.

it works on the first form where I am writing some data to a
dictionary(Dictionarybase). After the data

is written to the dictionary I redirect to another page and read the values.


My Code:

web.config :
<sessionState mode="InProc">

Session Startup: Session("Name") = New Object

Form1 has code to add to CType(Session("Name"), Object) then redirect to
Form2:


Form2:

With CType(Session("Name"), Object)
With .Item("Dictionary Item")

label1.text = .item("FieldName")

End With

End with

I've tried adding the EnableSessionState=True to the page directive, this
does not help.

This was working and nothing was changed, I can run it in debug but not
through IE and both are hitting the same server.

Can anyone help with this?

Thanks in Advance,
Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top