Base solution for your next web application
Open Closed

Error: No component for supporting the service #3167


User avatar
0
terry bentley created

I have upgraded to Abp 2.0.2 and must have messed something up and have spent hours trying to resolve it. I am getting the following error when I try to run the program from either Visual Studio 2015 or after deploying to IIS. Does anyone have any suggestions as to what I am missing or have misconfigured?

Server Error in '/' Application.

No component for supporting the service Abp.Resources.Embedded.IEmbeddedResourceManager was found 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: Castle.MicroKernel.ComponentNotFoundException: No component for supporting the service Abp.Resources.Embedded.IEmbeddedResourceManager was found

Source Error: 



Line 27:         public void Configuration(IAppBuilder app)
Line 28:         {
Line 29:             app.UseAbp();
Line 30: 
Line 31:             app.RegisterDataProtectionProvider();
  

 Source File:  C:\Users\bentleyt\Source\Repos\cipher\src\RtTech.Cipher.Web\App_Start\Startup.cs    Line:  29 

Stack Trace: 



[ComponentNotFoundException: No component for supporting the service Abp.Resources.Embedded.IEmbeddedResourceManager was found]
   Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy) +78
   Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments) +14
   Castle.Windsor.WindsorContainer.Resolve() +63
   Abp.Dependency.IocManager.Resolve() +49
   Abp.Owin.AbpOwinExtensions.UseAbp(IAppBuilder app, Action`1 optionsAction) +285
   Abp.Owin.AbpOwinExtensions.UseAbp(IAppBuilder app) +7
   RtTech.Cipher.Web.Startup.Configuration(IAppBuilder app) in C:\Users\bentleyt\Source\Repos\cipher\src\RtTech.Cipher.Web\App_Start\Startup.cs:29

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +160
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
   Owin.Loader.<>c__DisplayClass12.<MakeDelegate>b__b(IAppBuilder builder) +66
   Owin.Loader.<>c__DisplayClass1.<LoadImplementation>b__0(IAppBuilder builder) +123
   Microsoft.Owin.Host.SystemWeb.<>c__DisplayClass2.<InitializeBlueprint>b__0(IAppBuilder builder) +71
   Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) +462
   Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) +40
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +70
   System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +115
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +106
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +523
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +176
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +349
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +303

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +658
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +188

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1637.0

Thanks... Terry


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Normally it is in Abp here <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp/Resources/Embedded/EmbeddedResourceManager.cs">https://github.com/aspnetboilerplate/as ... Manager.cs</a>.

    Can you check if you have any reference to an older version of ABP or is there a dll in the published website on IIS for older version of ABP ?

    Thanks.

  • User Avatar
    0
    terry bentley created

    Thanks for the response.

    It looks like the "no component for supporting the service" is actually a red herring.

    For some reason the Global.asax.cs is not firing. This caused the WebModule not to execute and do the IoC registrations. However the Startup.cs is executing which is when the error comes up.

    Now to "just" figure out why the Global.asax.cs is no longer executing.

  • User Avatar
    0
    terry bentley created

    Problem solved.

    Global.asax was not executing due to the existance of precompiledapp.config file getting created by one of the developers by him checking to precompile on publish in VS and then the other developers downloading this change from source control. Removed the precompiledapp.config file and things started working again.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks a lot Terry Bentley, It is really hard to gues that :). I think this might help others.