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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:53:19+00:00 2026-06-10T17:53:19+00:00

In Global.asax file, I have the following code. config.DependencyResolver = new IoCContainer(unity); In IOCContainer,

  • 0

In Global.asax file, I have the following code.

config.DependencyResolver = new IoCContainer(unity);

In IOCContainer, it is showing as “Namespace not found”. What Namespace we should include here. I already included Microsoft.Practices.Unity.

  • 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-10T17:53:20+00:00Added an answer on June 10, 2026 at 5:53 pm

    You are missing the following classes. This took me a while to find aswell.
    Found the below code reference Here

    class ScopeContainer : IDependencyScope
    {
        protected IUnityContainer container;
    
        public ScopeContainer(IUnityContainer container)
        {
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }
            this.container = container;
        }
    
        public object GetService(Type serviceType)
        {
            if (container.IsRegistered(serviceType))
            {
                return container.Resolve(serviceType);
            }
            else
            {
                return null;
            }
        }
    
        public IEnumerable<object> GetServices(Type serviceType)
        {
            if (container.IsRegistered(serviceType))
            {
                return container.ResolveAll(serviceType);
            }
            else
            {
                return new List<object>();
            }
        }
    
        public void Dispose()
        {
            container.Dispose();
        }
    }
    
    class IoCContainer : ScopeContainer, IDependencyResolver
    {
        public IoCContainer(IUnityContainer container)
            : base(container)
        {
        }
    
        public IDependencyScope BeginScope()
        {
            var child = container.CreateChildContainer();
            return new ScopeContainer(child);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code in my Global.asax file: Protected Sub Application_PreRequestHandlerExecute(sender As Object,
Right now, in development I have the following code in the Global.asax.cs file that
In my Global.asax file, I have the following code that deals with with unhandled
In my Global.ASAX file i have the following: void Session_End(object sender, EventArgs e) {
In my Global.asax file I have the following; public static void RegisterRoutes(RouteCollection routes) {
I have an Application Object. In Global.asax file i use this: Application[obj] = test;
I have 2 test and 1 production server. In my global.asax file - I
I have code in global.asax that sets some things in cache with CacheItemRemovedCallback. When
Below I'm going to insert the code for the following: Global.asax DatabasesController ( ApiController
I have declared an object in my global.asax file as follows. <object Id=WFRuntime RunAt=Server

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.