# Grpc.Core.RpcException: Status(StatusCode="Unimplemented", Detail="Method 'ServiceName/MethodName' is unimplemented. If the server is not configured to serve this method, the call will fail.")

- **ID:** `dotnet/grpc-unimplemented-method`
- **Domain:** dotnet
- **Category:** protocol_error
- **Error Code:** `12`
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The gRPC client calls a method that the server does not have a handler registered for, often due to missing service registration, incorrect proto file compilation, or version mismatch between client and server.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.45.0 | active | — | — |
| 2.46.0 | active | — | — |
| 2.47.0 | active | — | — |
| 2.48.0 | active | — | — |

## Workarounds

1. **Ensure the service is registered in the DI container and endpoint mapping: in Program.cs, add 'app.MapGrpcService<MyServiceImpl>();' and in the service class, inherit from 'MyService.MyServiceBase' and override the method.** (90% success)
   ```
   Ensure the service is registered in the DI container and endpoint mapping: in Program.cs, add 'app.MapGrpcService<MyServiceImpl>();' and in the service class, inherit from 'MyService.MyServiceBase' and override the method.
   ```
2. **Regenerate gRPC stubs by running 'dotnet build' after updating the .proto file, or use 'dotnet grpc-aspnetcore-codegen' to ensure both client and server use the same proto definition.** (85% success)
   ```
   Regenerate gRPC stubs by running 'dotnet build' after updating the .proto file, or use 'dotnet grpc-aspnetcore-codegen' to ensure both client and server use the same proto definition.
   ```

## Dead Ends

- **** — Restarting the server without updating the code does not add the missing method handler; the service must be properly registered in Startup.cs or Program.cs. (90% fail)
- **** — Adding a new proto file without regenerating the server stubs leaves the server unaware of the method; the build step must compile the proto to C#. (70% fail)
