Comments (5)
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.
I'll work to get an example out this weekend.
from autofac.owin.
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.
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.
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)
- OwinLifetimeScopeKey configurable HOT 30
- External creation of ILifetimeScope HOT 15
- Is the dispose of the lifetime made too soon? HOT 18
- .NET Standard / .NET Core support? HOT 4
- Include the latest stable version of Microsoft.Owin (4.0.0) in dependencies HOT 6
- Autofac.Owin 4.2.0 seems to require Microsoft.Owin 3.0.0 HOT 1
- Put the registration into middlewares HOT 1
- Compatibility with Autofac v6 HOT 3
- Memory Leak Due to ThreadLocalStorage / ConcurrentBag / LifetimeScope Behavior in Owin HOT 15
- Middleware registration order is inverted during resolve HOT 4
- IAsyncDisposable HOT 1
- owin autofac middleware and controller lifetime not same one HOT 1
- 7.0.0 introduced memory leak due to async disposal issue in main Autofac HOT 10
- Nuget package cannot be installed against latest version of Autofac.
- Autofac - SingleInstance get's instantiated for every API request HOT 1
- Provide the ability to control middleware execution order in the OWIN integration HOT 3
- Move DisposeScopeOnAppDisposing from Web API OWIN integration into core OWIN integration HOT 1
- Allow DI for IAppBuilder.Run HOT 3
- Only Microsoft.Owin.Middleware HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autofac.owin.