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

  • Home
  • SEARCH
  • 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 824877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:09:56+00:00 2026-05-15T03:09:56+00:00

I am new to StructureMap. I have downloaded and am using version 2.6.1.0. I

  • 0

I am new to StructureMap. I have downloaded and am
using version 2.6.1.0. I keep getting the below
error:

StructureMap Exception Code: 202 No
Default Instance defined for
PluginFamily
Company.ProjectCore.Core.IConfiguration,
Company.ProjectCore, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null

My Global.asax.cs looks like:

protected void Application_Start(object sender, EventArgs e)
{

    var container = new Container(x =>
                    {
                        x.For<ICache>().Use<Cache>();
                        x.For<IEmailService>().Use<EmailService>();
                        x.For<IUserSession>().Use<UserSession>();
                        x.For<IRedirector>().Use<Redirector>();
                        x.For<INavigation>().Use<Navigation>();
                    });

                container.AssertConfigurationIsValid();

}

I changed from ObjectFactory.Initialize to “new Container” to debug.
When stepping through the AssertConfigurationIsValid() method, Cache
works but EmailService fails at the GetInstance method in the
following line:

[Pluggable("Default")]
public class EmailService : IEmailService

private readonly IConfiguration _configuration;

public EmailService()
{
    _configuration = ObjectFactory.GetInstance<IConfiguration>();
}

If I remove IEmailService, the same 202 error is thrown at IUserSession.

Should I be adding something else in Application_Start or in my class files?

Thanks in advance…

  • 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-15T03:09:57+00:00Added an answer on May 15, 2026 at 3:09 am

    This problem was fixed by replacing ObjectFactory.Initialize with ObjectFactory.Configure and adding the assemblies in my project:

    ObjectFactory.Configure(x =>
    {
        x.Scan(scan =>
        {
            scan.LookForRegistries();
            scan.Assembly("MyAssembly");
            scan.Assembly("MyAssembly");
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to StructureMap and have some existing code that I'm working with that
Im new to IOC and StructureMap and have an n-level application and am looking
Using StructureMap, is it possible to have a singleton object for each value of
I have an ASP.Net MVC application and I am using StructureMap within MVC to
I have this code for on ASP.NET MVC website: x.For<AccountController>().TheDefault.Is.ConstructedBy(() => new AccountController()); This
I keep getting this exception (in the title) whenever I try to get the
New to javascript/jquery and having a hard time with using this or $(this) to
In new C++ code, I tend to use the C++ iostream library instead of
I am fairly new to StructureMap, but my understanding is that there are two
I am sort of new to MVC so pardon my ignorance. I am using

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.