session not available when using AJAX

hi,

i'm trying to call a session that i create on my first page let call it session("test1") this session contains an array lets call it ar1. I am trying to call my ajax function located on "AjaxFunctions.vb" call "ParseArray" everything goes well untill i try to get the info inside my session. all i get is "Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive", now session state is turned on, the page that contains the ajaxfunction also has the enablesessionstate="true" flag. What am i doing wrong.

Vince
LVL 1
VBSMerlinAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

williamcampbellCommented:
<web.config>
    <sessionState

Did you try setting it in Web.Config?
All are you using Sharepoint Services or FreeToolBox?
VBSMerlinAuthor Commented:
this is the linbe in my web config

<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
                  cookieless="false" timeout="60" />
VBSMerlinAuthor Commented:
Figured it out for anyone else that might ever get this problem here is the solution to AJAX and Session State

If you ever get in your AJAX function an error stating that the session is null. Add the following handler in front of your Function that will resolve the issue

<Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.ReadWrite)> _
Public Function SomeFunction() As String
  'your code here
  Return aString
End function
GranModCommented:
PAQed with points refunded (500)

GranMod
Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.