Skip to content

Service behavior

Gísli Konráð Björnsson edited this page Mar 7, 2018 · 2 revisions

Global service behaviors

You can add global service behavior rules by adding IServiceBehavior implementations to the service container as singletons.

services.AddSingleton<IServiceBehavior, ServiceThrottlingBehavior>();

DISCLAIMER: Not all service behaviors are guaranteed to work since we are proxying the request.

Per-service service behaviors

You can add different service behaviors to separate service hosts, if you are hosting more that one service in the same process. This is done during initialization on the AddWcfService method.

Clone this wiki locally