OrchardCore: Error enabling OpenID module
When I enable a OpenID module, there is an error:
InvalidOperationException: The connection does not support MultipleActiveResultSets.

About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 34 (34 by maintainers)
Hmm, maybe because of the following (see below).
It allows a bgTask to use service as
SiteServicewhich do thisBut when restarting a tenant i think the 1st time the bgTask execute it is in the context of the request. Hmm, maybe idem on the 1st request when starting the app.
So, when running concurently because of the bgTask timer, and in the context of the same request, even we enter in a new scope in a bgTask, we could share the same session through
RequestServices. Maybe, as in O1 we would need to built a fakeHttpContextwhen in the context of a bgTask.Or, in
BackgroundTaskServicewhen weActivete()timer, maybe just start them immediately but don’t do anything in the 1st execution, or find a way to check if the request in which the timer has been started is not ended. Humm, easy to check through anIHttpContextAccessor.HttpContextobject. I will try it.