Results 1 to 3 of 3

Thread: 'session'-scoped objects require SessionState to be enabled

  1. #1
    Join Date
    Mar 2012
    Posts
    3

    Default 'session'-scoped objects require SessionState to be enabled

    Hi,

    When I try to inject a session scoped object I get the following error: 'session'-scoped objects require SessionState to be enabled.

    This is the configuration: (problem is with candidateContext)

    <?xml version="1.0" encoding="utf-8" ?>
    <objects xmlns="http://www.springframework.net">

    <!-- Advice -->
    <object id="serviceAdvisor" type="Spring.Aop.Support.AttributeMatchMethodPoint cutAdvisor, Spring.Aop" singleton="false">
    <property name="attribute" value="Cebir.Core.Common.InterceptableSession, Core"/>
    <property name="advice" ref="serviceInterceptor"/>
    </object>

    <!-- Service Interceptor -->
    <object id="serviceInterceptor" type="Cebir.Core.Common.WebServiceInterceptor, Core" singleton="false">
    <property name="CandidateRepository" ref="candidateRepository"/>
    <property name="ConfigurationRepository" ref="configurationRepository" />
    <property name="CandidateContext" ref="candidateContext" />
    </object >

    <object id="candidateContext" type="Cebir.Core.Common.Context.CandidateContext, Core" scope="session"/>

    </objects>



    I already added <pages enableSessionState="true"> in the web.config.


    Anyone has an idea how to solve this?

    Thanks in advance!
    Kevin

  2. #2
    Join Date
    Jul 2010
    Posts
    245

    Default

    Its definitely the case that ASPNET session state needs to be enabled in order for session-scope to work I'm guessing that you have it otherwise disabled somewhere else (either in your app or in IIS perhaps?).

    Make sure that you check all of the places listed here http://technet.microsoft.com/en-us/l...=ws.10%29.aspx to ensure that *none* of them are true in your situation.

    -Steve B.

  3. #3
    Join Date
    Mar 2012
    Posts
    3

    Default

    Thanks for the reply. I will check it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •