Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6533543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:08:24+00:00 2026-05-25T10:08:24+00:00

I’m having a bit of a problem keeping values from appearing in scope for

  • 0

I’m having a bit of a problem keeping values from appearing in scope for all users. I’m not sure what exactly I may be doing wrong, but I’m at wits end. I’m thinking either I have my container objects scoped wrong or I’m passing the values along the WebContext. First, here’s what I’m doing in code. This works, but it’s showing details for the first user who logs into the site (note: my PageStore is just a property of type IDictionary that stores values to share to all user controls on the page):

using (BasePage page = (BasePage)(Spring.Web.UI.Page)this.Context.Handler) {
    if ((page.PageStore("LoginId") != null)) {
        this.Model.LoginId = Convert.ToString(page.PageStore("LoginId"));
    }
}

Second, I’ve tried different scopes for my objects but I’m coming up empty. Here is how my objects are currently configured in the container:

Snippet of my business tier configuration

 <!-- Transaction Management Strategy - local database transactions -->
    <object id="transactionManager"
          type="Spring.Data.Core.AdoPlatformTransactionManager, Spring.Data" scope="request">
        <property name="DbProvider" ref="MyProvider"/>
    </object>
    <tx:attribute-driven transaction-manager="transactionManager" />

    <!-- Data Access Objects -->
    <object id="DataAccess" type="MyApp.Business.DataAccess.DataAccess, MyApp.Business.DataAccess" abstract="true"  scope="request">
        <property name="AdoTemplate" ref="MyTemplate" />
    </object>

    <object id="ManagerDAO" type="MyApp.Business.DataAccess.ManagerDAO, MyApp.Business.DataAccess" parent="DataAccess" scope="request">
        <property name="TableName" value="vw_managers" />
        <property name="IsAllowedDeletion" value="False" />
        <property name="IsAllowedUniqueIdRetrieval" value="False" />
    </object>

     <!-- Services -->            

    <object id="SearchService" type="MyApp.Business.Services.SearchService, MyApp.Business.Services" scope="request">
        <property name="ManagerDAO" ref="UserDAO" />
    </object>

Snippet of my presentation layer:

<object id="BasePageModel" type="MyApp.Presentation.Models.BasePageModel, MyApp.Presentation" abstract="true"  scope="session"/>
<object id="ManagerModel" type="MyApp.Presentation.Models.ManagerModel, MyApp.Presentation" parent="BasePageModel"  scope="session"/>

<!-- Presenters-->    
<object name="ManagerPresenter" type="MyApp.Presentation.Presenters.ManagePresenter, MyApp.Presentation" singleton="false" scope="session">
    <property name="SearchSvc" ref="SearchService"/>
</object>

Snippet of my UI layer objects:

    <!-- Pages -->
    <object id="BasePage" type="MyApp.UI.BasePage, MyApp.UI" abstract="true" singleton="false" scope="session" />    

    <object id="StandardPage" parent="BasePage" abstract="true" singleton="false" scope="session">
        <property name="MasterPageFile" value="~/Layouts/Site.master"/>
    </object>  
    <object type="~/Pages/Manager.aspx" parent="StandardPage" singleton="false" scope="session"/>

I know there are 100 ways to skin this cat, but the fastest solution is to just get this configured properly and drive on. Is my configuration flaky or am I going about this all wrong?

Edit: Common sense is starting to kick in….IDictionary isn’t thread safe.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:08:24+00:00Added an answer on May 25, 2026 at 10:08 am

    Fixed my problem. Switched my Dictionary objects to thread safe ConcurrentDictionary objects and fixed my scoping issues. For the scopes, my business tier objects are singletons, my model objects are in the session scope, and my views(user controls) and pages are now set to the request scope, non-singletons.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am currently running into a problem where an element is coming back from
I have a text area in my form which accepts all possible characters from
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.