GithubHelp home page GithubHelp logo

Comments (10)

borgdylan avatar borgdylan commented on July 25, 2024

This bug does not let my app run at all as all requests return an internal server error.

from security.

Tratcher avatar Tratcher commented on July 25, 2024

I don't think this is related to the security middleware changes, the exception is coming from here:
https://github.com/aspnet/Routing/blob/dev/src/Microsoft.AspNet.Routing/RouterMiddleware.cs#L61

@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.

from security.

Tratcher avatar Tratcher commented on July 25, 2024

@borgdylan It looks like RequestServices is null. Do you still have a call to UseServices in your startup?

Also: aspnet/Hosting#88

from security.

Tratcher avatar Tratcher commented on July 25, 2024

@HaoK

from security.

borgdylan avatar borgdylan commented on July 25, 2024

I am no longer calling ContainerExtensions.UseServices. I am using ConfigureServices in my Startup class. Should I revert back for now?

from security.

HaoK avatar HaoK commented on July 25, 2024

Using ConfigureServices is fine, but you still need UseServices to actually use the services you configured

from security.

HaoK avatar HaoK commented on July 25, 2024

The UseServices() with no parameters is what you want to use to automatically use the Configured services

from security.

borgdylan avatar borgdylan commented on July 25, 2024

That fixed the issue. Thanks

from security.

Tratcher avatar Tratcher commented on July 25, 2024

I'm still going to open a bug against RouterMiddleware, logging shouldn't be resolved that way.

from security.

borgdylan avatar borgdylan commented on July 25, 2024

Indeed. Adding an ILoggerFactory in ConfigureServices still causes the exception without UseServices

from security.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.