Open shersh opened 5 years ago
In our projects we are using this in a generic host orleans and hosted along with an aspnet web similar to this https://github.com/dotnet/orleans/blob/master/Samples/2.3/HealthCheckSample/src/Silo/Program.cs and it does work.
Sometimes after switching to generic host we are getting the following: https://github.com/OrleansContrib/SignalR.Orleans/issues/89 however we use it in production and most of the time it does work, not sure if its related or its misconfiguration on our end tho
I also trying to use this when an orleans backend is co-hosted with ASP.NET API, but whenever I class IGrainFactory.GetGrain<>
, I get an error saying ''System.ArgumentException: 'Cannot find an implementation class for grain interface: IMyGrain. Make sure the grain assembly was correctly deployed and loaded in the silo.'"
If I remove siloBuilder.UseSignalR()
, the my GetGrain call works. I can also reproduce the problem with the Co-Host example found here
@zeus82 Check if this solves the issue
@shersh Have you solved this problem? Can you tell me the solution
I fixed my issue by adding the following:
siloBuilder.ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(MyGrain).Assembly).WithReferences());
From what I can tell, you need to do this because SignalR adds itself as an application part.
@zeus82 I have this configuration in the code. With the addition of signalr, there is no way to access it. Just remove the code related to signalr. But I can't find the cause of the error at the moment
Can you share the exact error your getting?
Also, what version of ASP are you using?
of course, i'm using asp.net core 3.0,Microsoft.Orleans.CodeGenerator.MSBuild v3.1.6,error:Cannot find an implementation class for grain interface,
So this doesn't actually work with ASP Core 3, it only works with 2. I have fixed it to work with 3. See this Repo: https://github.com/zeus82/SignalR.Orleans
I opened a PR to update this repo, but I haven't gotten a response... https://github.com/OrleansContrib/SignalR.Orleans/pull/116
Can you also share your silobuilder code?
Is it possible to use this packet without ClientBuilder, when orleans backend is co-hosted with ASP.NET API ?