Skip to content

Specified method is not supported #254

@m-ali-zafar

Description

@m-ali-zafar

I am trying to call grpc server that implements code first service. I am unable to call that service from client if I add CallOptions to the service method parameters for passing bearer token.

When I execute the client it throws the following exception:

Unhandled exception. System.NotSupportedException: Specified method is not supported. at ProtoBuf.Grpc.Internal.Proxies.ClientBase.ICustomerService_Proxy_0.ICustomerService.CreateCustomer(CreateCustomerCommand , CallOptions )

If I remove the CallOptions parameter and then execute the call it works perfectly as it should.

Additionally, package referenced in client and server have the same version.

Service Implementation

    [Authorize]
    public class CustomerService : ICustomerService
    {
        IMediator _mediator;
        public CustomerService(IMediator mediator)
        {
            _mediator = mediator;
        }

        public Task CreateCustomer(CreateCustomerCommand request, CallOptions callOptions)
        {
            return _mediator.Send(request);
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions