OWin Appbuilder rebuilding the app 70 -125 times per event

I found the answer here

Dependency Injection in Owin

… each time the OwinContext is pulled from the HttpContext, it returns a new context … if we are applying DI terms here, then your object is registered in per-request scope, as you would expect to be DbContext.

And I recently learned the difference between “transient”, “scoped” and “singleton” in this answer.

It turns out a page request of our (very large) project (in development mode, where caching of static files is off) causes 125 requests to server, which caused the issue.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top