Base solution for your next web application
Open Closed

Issue when trying to use azure signalR with aspnet zero project with .net core2.1 #10103


User avatar
0
razkhan78 created

AspNetZero (Paid) Product version --> 4.0 Product type --> MVC Product framework type --> .net core 2.1

Hi We are trying to connect to azure signalR

and getting these 4 errors:

=>Castle.MicroKernel.ComponentActivator.ComponentActivatorException: 'ComponentActivator: could not instantiate Microsoft.Azure.SignalR.ServiceLifetimeManager`1[[LoadStop.Web.Chat.SignalR.ChatHub, LoadStop.Web.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null]]'

=>Exception: Could not instantiate Microsoft.Azure.SignalR.ServiceLifetimeManager`1[[LoadStop.Web.Chat.SignalR.ChatHub, LoadStop.Web.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null]].

=>TargetInvocationException: Exception has been thrown by the target of an invocation.

=>InvalidOperationException: 'AddAzureSignalR(...)' was called without a matching call to 'IApplicationBuilder.UseAzureSignalR(...)'.

Same is working for asp.net core 3.1 aspnetzero with jQuery project we have but issue with this one with .net core 2.1.


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

    Hi @razkhan78

    Could you check if UseAzureSignalR is executed in your Startup.cs when yo udebug the source code ?

  • User Avatar
    0
    razkhan78 created

    @ismcagdas

    Yes, AddAzureSignalR is executed and breaking in LoadStopCoreModule.PostInitialize.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @razkhan78

    In that case, I couldn't understand the reason only with this exception. Is it possible for you to share your project via email with [email protected] so we can check it for you ?

    As an alternative, you can try to upgrade your solution to .NET 3.x but I think it will be harder.