Giter VIP home page Giter VIP logo

Comments (5)

tillig avatar tillig commented on July 25, 2024

I don't understand what you're asking for here. The call stack doesn't appear to have any Autofac components and there's not enough information here to understand why you'd want to change the HttpRequestMessageProvider. I see there's a security related exception, but I don't understand the conditions under which that would occur. Please provide more information so we can understand better the problem and ensure the fix is correct (and that it won't get regressed later).

from autofac.webapi.

pengweiqhca avatar pengweiqhca commented on July 25, 2024

I don't understand what you're asking for here. The call stack doesn't appear to have any Autofac components and there's not enough information here to understand why you'd want to change the HttpRequestMessageProvider. I see there's a security related exception, but I don't understand the conditions under which that would occur. Please provide more information so we can understand better the problem and ensure the fix is correct (and that it won't get regressed later).

Because, I call builder.RegisterHttpRequestMessage(GlobalConfiguration.Configuration) in Startup.cs, and call a remoting service in webapi.

If I delete builder.RegisterHttpRequestMessage(GlobalConfiguration.Configuration) or refactoring HttpRequestMessageProvider use AsyncLocal, I will not get a exception.

from autofac.webapi.

tillig avatar tillig commented on July 25, 2024

Remoting? 😱 I see. OK, that wasn't clear.

Yeah, we can probably do that. I'm not sure how quickly one of us can do it, but we'd take a PR. We'd also need to make sure it's tested out before we release to make sure the change doesn't break folks. Things don't change much in here and that could be a subtle breaking thing.

from autofac.webapi.

tillig avatar tillig commented on July 25, 2024

Is there a way to do a local build of Autofac.WebApi so you can test that would fix it? I want to make sure we aren't changing something that won't actually end up helping. Remoting and security context stuff can be a little tricky and changing one thing might reveal the problem to just be something else underneath it.

from autofac.webapi.

pengweiqhca avatar pengweiqhca commented on July 25, 2024

Is there a way to do a local build of Autofac.WebApi so you can test that would fix it? I want to make sure we aren't changing something that won't actually end up helping. Remoting and security context stuff can be a little tricky and changing one thing might reveal the problem to just be something else underneath it.

I refactoring HttpRequestMessageProvider, and it work well.

from autofac.webapi.

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.