Results 1 to 3 of 3

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

  1. #1
    Join Date
    Mar 2012

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


    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="">

    <!-- 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"/>

    <!-- 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"/>


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

    Anyone has an idea how to solve this?

    Thanks in advance!

  2. #2
    Join Date
    Jul 2010


    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 to ensure that *none* of them are true in your situation.

    -Steve B.

  3. #3
    Join Date
    Mar 2012


    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