Code Monkey home page Code Monkey logo

Comments (5)

alexmg avatar alexmg commented on July 19, 2024

Do you have a simple example that reproduces this issue? It sounds like a weird one and there isn't much to go on here.

from autofac.owin.

alexkolt avatar alexkolt commented on July 19, 2024

I'll work to get an example out this weekend.

from autofac.owin.

tillig avatar tillig commented on July 19, 2024

I was able to replicate the issue in this project:
WebApplication1.zip

I'm not sure what the root cause is yet, but it's reproduced.

from autofac.owin.

tillig avatar tillig commented on July 19, 2024

The problem appears to be in the AutofacAppBuilderExtensions class in UseAllMiddlewareRegisteredInContainer. Specifically, we get the list of middleware like this:

var services = container.ComponentRegistry.Registrations.SelectMany(r => r.Services)
    .OfType<TypedService>()
    .Where(s => s.ServiceType.IsAssignableTo<OwinMiddleware>() && !s.ServiceType.IsAbstract)
    .Select(service => typeof(AutofacMiddleware<>).MakeGenericType(service.ServiceType))
    .Where(serviceType => !container.IsRegistered(serviceType));

With ACTNARS registered, that last bit .Where(serviceType => !container.IsRegistered(serviceType)) fails because it thinks everything is registered. I'm guessing the real intention of this filter was to get rid of any accidental inclusion of AutofacMiddleware<T> itself.

Let me see if I can fix that up.

from autofac.owin.

tillig avatar tillig commented on July 19, 2024

As soon as the build completes I'll be pushing a new version. This will probably be the 4.0.0 release/stable version.

from autofac.owin.

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.