Polhem.JsonRpc.Payload.Server 1.2.0

dotnet add package Polhem.JsonRpc.Payload.Server --version 1.2.0
                    
NuGet\Install-Package Polhem.JsonRpc.Payload.Server -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Polhem.JsonRpc.Payload.Server" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Polhem.JsonRpc.Payload.Server" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Polhem.JsonRpc.Payload.Server" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Polhem.JsonRpc.Payload.Server --version 1.2.0
                    
#r "nuget: Polhem.JsonRpc.Payload.Server, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Polhem.JsonRpc.Payload.Server@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Polhem.JsonRpc.Payload.Server&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Polhem.JsonRpc.Payload.Server&version=1.2.0
                    
Install as a Cake Tool

Polhem.JsonRpc.Payload.Server

The server half of Polhem.JsonRpc.Payload: a dispatcher filter that opens the payload envelope of each request (decryption, decompression, the codec), checks its replay-protection frame, and answers in the same format and codec.

builder.Services.AddJsonRpcServer(options =>
{
    options.ObjectFactory = new MyObjectFactory();
    options.Filters.Add(new MyAccessFilter());          // runs before the body is decrypted
    options.UsePayload(payloadOptions, new MyPayloadPolicy());
});

IPayloadServerPolicy is where the application answers what the package cannot know: the key of an encrypted call, the scope a sequence number must be unique in, which methods reject a repeated one, the lowest format a method accepts (only Encrypted makes the replay checks impossible to skip), and the type to decode into. The type is always decided by the server; the type member of a request is only checked against it, so the contract types are not registered with PayloadOptions.TypeResolver. Where sequence numbers are checked (PayloadOptions.RequireFrame on and a replay scope for the caller), a method that rejects a repeated one also refuses plain and encoded calls, because only an encrypted frame proves its number new. UsePayload answers -32602 Invalid params for a malformed envelope, a call below the method's minimum format, and a plain or encoded call to such a method; every other payload failure is -32603, unless the application's own ExceptionMapper, set before UsePayload, answers it first. A compressed body is bounded by the compressor's own limit and, with a compressor that accepts a limit as GzipPayloadCompressor does, by PayloadOptions.MaxDecompressedBytesPerMessage for the whole message, the call alone or a batch, because an encoded body is decompressed before any key is asked for. MemoryPayloadReplayStore remembers sequence numbers in the process; a deployment with several instances needs a shared IPayloadReplayStore.

Documentation and samples: https://github.com/polhem-dev/polhem-jsonrpc

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Polhem.JsonRpc.Payload.Server:

Package Downloads
Polhem.Api.Server

The server side of the Polhem JSON-RPC API: the dispatcher setup, the access and payload filters, API key and authorization checks, and the exception mapping.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 428 10/5/2026
1.1.1 160 10/5/2026