Git Product home page Git Product logo

Comments (9)

JunTaoLuo avatar JunTaoLuo commented on August 16, 2024 1

Before closing the issue, I will also need to resolve the correct ApplicationName and pass it along to the builder when we wrap the RequestDelegate at https://github.com/aspnet/MetaPackages/blob/dev/src/Microsoft.AspNetCore/WebHost.cs#L38. Otherwise the correct ApplicationName gets overwritten to Microsoft.AspNetCore.

from metapackages.

lutzroeder avatar lutzroeder commented on August 16, 2024

Adding .UseHandler() following the existing extension methods might be helpful as well skipping .Configure():

IWebHost webHost = new WebHostBuilder().UseKestrel().UseUrls(url).UseHandler(context => context.Response.WriteAsync("Hello, World!")).Build()

from metapackages.

DamianEdwards avatar DamianEdwards commented on August 16, 2024

@lutzroeder we don't have a concept of "handlers" in ASP.NET Core (although I course understand the intent) but the bigger issue is a method like that won't compose properly with the rest of the methods on IWebHostBuilder, i.e. you can't call it more than once, you can't call it along with .Configure(), etc. Once you go to the builder API, you have to configure the pipeline the normal way.

from metapackages.

DamianEdwards avatar DamianEdwards commented on August 16, 2024

@JunTaoLuo is this done now?

from metapackages.

DamianEdwards avatar DamianEdwards commented on August 16, 2024

@JunTaoLuo @davidfowl maybe we should add the debug logger by default too. Originally I think we planned to just merge it into the core logging package and always be on but it could just be enabled by this now. Thoughts?

from metapackages.

JunTaoLuo avatar JunTaoLuo commented on August 16, 2024

I still need to add tests. I only merged the changes to unblock @CesarBS. I think we also found a bug that need to be fixed.

from metapackages.

DamianEdwards avatar DamianEdwards commented on August 16, 2024

@JunTaoLuo bugs? 🔥

from metapackages.

DamianEdwards avatar DamianEdwards commented on August 16, 2024

@JunTaoLuo please ensure the DebugLogger is added by WebHost.CreateDefaultBuilder too. This needs to happen so that templates don't need to add it and the debug logging continues to work.

from metapackages.

JunTaoLuo avatar JunTaoLuo commented on August 16, 2024

Functional tests added, and follow up issues have been filed.

from metapackages.

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.