Have you tried setting env. variable GRPC_VERBOSITY=debug (will give you extra info) and potentially also GRPC_TRACE=... (see https://github.com/grpc/grpc/blob/master/doc/environment_variables.md). This might tell you more about why you are getting the Unavailable status (e.g. resolution problem, channel's failure to connect etc...).
>From your description, I don't see anything wrong with what you are doing - things should work the same. It also seems that the native extension has been loaded correctly (because you are able to start a call and get a statuscode back), so .NET core app and .NET core webapi project should really behave the same (also because the call handling actually happens in the native code, so it shouldn't matter what .NET application type you are using). On Tuesday, April 17, 2018 at 8:18:05 PM UTC+2, [email protected] wrote: > > I have a C# grpc service that works fine if I call it from a .Net Core > Console app...However, I get the following error if I try to call it from a > .Net Core Webapi Project [Status(StatusCode=Unavailable, Detail="Connect > Failed")]. The difference between the console app and the webapi app is > that I am not creating the channel in the main method...I am instead > creating it elsewhere...I have tried several different ways: > > - In the startup class, and inject it as a dependency injection to a > repository class to use it. > - Creating new instance in my repository class. > - Creating a new instance in my webapi controller. > > But, all those methods result in the same error of: > [Status(StatusCode=Unavailable, Detail="Connect Failed")] > > Does anyone have any insight on how to get over this hurdle?...The big > picture is a webapi .net core aggregation rest service, that will be > calling underlying grpc services. Is that just not possible? > > Thanks in advance, > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/d0aa5db1-f222-41df-ba11-f3b1c93481de%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
