Stateful
The most optimized method is to write a custom persistence store that implements IRelyingPartyApplicationStore
for the "secrets" that OpenID RPs require, and pass your instance to the OpenIdRelyingParty(IRelyingPartyApplicationStore)
constructor, or register it in your web.config file.
Stateless
A much easier solution that will suffice for most scenarios is to use stateless mode instead, so that no state needs to be shared across your web farm's servers.
You can activate stateless mode by instantiating OpenIdRelyingParty
passing null
in as your application store instance. Calling the default constructor will cause DNOA to use its in-memory store, which breaks on server farms, so the default constructor is insufficient.
Or if you're using the ASP.NET controls, just set Stateless = true
on the control.