Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using cohost #98

Open
shersh opened this issue Sep 23, 2019 · 9 comments
Open

Using cohost #98

shersh opened this issue Sep 23, 2019 · 9 comments

Comments

@shersh
Copy link

shersh commented Sep 23, 2019

Is it possible to use this packet without ClientBuilder, when orleans backend is co-hosted with ASP.NET API ?

@stephenlautier
Copy link
Contributor

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: #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

@zeus82
Copy link
Contributor

zeus82 commented May 5, 2020

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

@srivathsah
Copy link

@zeus82 Check if this solves the issue

@xrkraken
Copy link

xrkraken commented Sep 8, 2020

@shersh Have you solved this problem? Can you tell me the solution

@zeus82
Copy link
Contributor

zeus82 commented Sep 8, 2020

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.

@xrkraken
Copy link

xrkraken commented Sep 9, 2020

@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

@zeus82
Copy link
Contributor

zeus82 commented Sep 9, 2020

Can you share the exact error your getting?

Also, what version of ASP are you using?

@xrkraken
Copy link

xrkraken commented Sep 9, 2020

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,

@zeus82
Copy link
Contributor

zeus82 commented Sep 9, 2020

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...
#116

Can you also share your silobuilder code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants