Code Monkey home page Code Monkey logo

Comments (1)

tillig avatar tillig commented on July 1, 2024

The reason I didn't answer it on Stack Overflow is because it's not a minimal reproducible example.

In this case, minimal is the key word. There is a lot you can do to reduce the problem and figure this out yourself, or at least help other folks help you. To start...

  • Create a whole new project.
  • Set up WebAPI and OWIN.
  • Create one controller.
  • Create one dependency.
    • Call it ScriptExecutionHost.
    • No parameters in the constructor.
    • Register that as a singleton.
  • Verify singletons work as expected.

I guarantee singletons work. Now you've established that the issue is with app code, not Autofac, and that the question is definitely a "how do I?" question and not a bug. (This is why I'm going to close this issue after I comment here.)

Now add a single string parameter to the minimal ScriptExecutionHost.

You should end up with a fraction of the NuGet dependencies and none of the irrelevant code to do with credentials managers and file downloads and all that junk.

Cool, so now you can start figuring out how to inject the string parameter, for which we have an FAQ that can help give you ideas.

While I'd love to be able to personally work with folks and answer every question, the reason we point folks to SO and very explicitly away from issues is that none of the Autofac maintained have the time to offer free consulting hours. There's no paid team here, no one has a "job writing and supporting Autofac," so we have to rely on the community. The community doesn't monitor issues, so they're reserved for actual issues. We do monitor SO but there's no way we can personally answer each question, especially if a question looks like it's going to eat a lot of time to answer - those invariably turn from "question" into "let's iterate over the code and have a discussion and get clarification..." and it becomes a days-long support issue. (I think the Code Review Stack Overflow handles the iteration and discussion questions.) Just writing this answer up was a half hour. Answers take time. Lots of time.

Anyway, that's all I can offer here. I hope it helps unblock you. Sorry I can't offer more.

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.