-
Notifications
You must be signed in to change notification settings - Fork 598
Exception when using the new DI activated options style cookie auth #72
Comments
This bug does not let my app run at all as all requests return an internal server error. |
I don't think this is related to the security middleware changes, the exception is coming from here: @yishaigalatzer Do you know where this logging resolution pattern came from? It's not how we do it anywhere else. See CookieAuthMiddleware & Extensions for a better example. |
@borgdylan It looks like RequestServices is null. Do you still have a call to UseServices in your startup? Also: aspnet/Hosting#88 |
I am no longer calling ContainerExtensions.UseServices. I am using ConfigureServices in my Startup class. Should I revert back for now? |
Using ConfigureServices is fine, but you still need UseServices to actually use the services you configured |
The UseServices() with no parameters is what you want to use to automatically use the Configured services |
That fixed the issue. Thanks |
I'm still going to open a bug against RouterMiddleware, logging shouldn't be resolved that way. |
Indeed. Adding an ILoggerFactory in ConfigureServices still causes the exception without UseServices |
After updating to newest security packages, I get the following exception:
The text was updated successfully, but these errors were encountered: