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 8489703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:54:06+00:00 2026-06-10T21:54:06+00:00

We are using Microsofts Unity IOC container in an ASP.Net solution. In one of

  • 0

We are using Microsofts Unity IOC container in an ASP.Net solution.

In one of the top layers we use the RegisterInstance method. We then get it back lower down with the Resolve method.

While looking at another problem we have seen that ASP.Net has thread agility, that is that a request can jump threads.

So the question is if we register an instance on one thread, and the request jumps thread before we resolve the instance, will we get back the correct instance?

  • 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-06-10T21:54:08+00:00Added an answer on June 10, 2026 at 9:54 pm
    1. If you resolve your type on same container you’ve registered it in (or its child), you’ll get correct instance.

    2. As far as I know there’s no need to register types in container on every request, that’s usually done somewhere on application start.

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

Sidebar

Related Questions

Using Microsoft Unity i register the following type: container.RegisterType(typeof(IRepository<>), typeof(NHibernateRepository<>)); In ASP.NET MVC 2
We've been using Unity for our ASP.NET MVC3 applications. The configuration is done solely
I have set up an Unity 2.0.414.0 container using app config. My solution structure
I'm working on a demo that makes use of Spring.NET IoC capability in ASP.NET
I'm using the Unity IoC container for resolving my objects. However, I've run into
Ninject, Sprint.NET, Unity, Autofac, Castle.Windsor are all examples are IoC frameworks that are available.
I´ve been checking Microsot Unity IOC and found some examples using Code First approach.
I'm trying to invoke the RegisterType method in the Unity container. RegisterType has a
I'm working on my 1st project using MS Unity IoC framework. If I have
The Unity documentation states: if a class that developers instantiate using the Resolve method

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.