You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While setting up the usage of the nuget package (version 3.0.0), I encountered the following problem on application startup:
{"exception":{"ClassName":"System.InvalidOperationException","Message":"No 'ICorrelationIdProvider' has been registered. You must either add the correlation ID services using the 'AddDefaultCorrelationId' extension method or you must register a suitable provider using the 'ICorrelationIdBuilder'.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at CorrelationId.CorrelationIdMiddleware.Invoke(HttpContext context, ICorrelationContextFactory correlationContextFactory)\r\n at HIDDEN"(...)}
Which is unexpected as I don't want to use an ICorrelationIdProvider. I expect my setup to work, this is it:
According to the documentation of options.CorrelationIdGenerator, "When set, this function will be used instead of the registered ICorrelationIdProvider" which makes sense and I like it, but then do not require an ICorrelationIdProvider to be registered since it will never be used.
I understand that instead of AddCorrelationId I could use AddDefaultCorrelationId which would probably solve the problem since it registers a default Guid correlation id provider, but why would I register a default that should never be used and is forbidden to use?
The text was updated successfully, but these errors were encountered:
Hi!
While setting up the usage of the nuget package (version 3.0.0), I encountered the following problem on application startup:
Which is unexpected as I don't want to use an
ICorrelationIdProvider
. I expect my setup to work, this is it:Inside
ConfigureServices
Inside
Configure
:According to the documentation of
options.CorrelationIdGenerator
, "When set, this function will be used instead of the registered ICorrelationIdProvider" which makes sense and I like it, but then do not require anICorrelationIdProvider
to be registered since it will never be used.I understand that instead of
AddCorrelationId
I could useAddDefaultCorrelationId
which would probably solve the problem since it registers a default Guid correlation id provider, but why would I register a default that should never be used and is forbidden to use?The text was updated successfully, but these errors were encountered: