Giter Site home page Giter Site logo

Comments (6)

NinoFloris avatar NinoFloris commented on May 23, 2024

Grrr this won't work as it'll be compiled to a standard optimized closure, aka AssemblyName = FSharp.Core.

    router (scope {
        forward "/api" apiScope
    })

Only like this will an actual type be generated inside your own app to get a good read of.

    router (fun next -> (next |> scope {
        forward "/api" apiScope
    }))

Any clever ideas? @Krzysztof-Cieslak

from saturn.

baronfel avatar baronfel commented on May 23, 2024

A possible workaround here would be for Saturn to add a app_name CE member to the application CE and set the backing setting explicitly, and if the user doesn't provide an app name then set it by default from the current executing assembly?

The actual configuration change would be

.UseSetting(WebHostDefaults.ApplicationKey, "CustomApplicationName")

from saturn.

NinoFloris avatar NinoFloris commented on May 23, 2024

Relevant, it may get more clear in 3.0 dotnet/aspnetcore#7315

from saturn.

davidalpert avatar davidalpert commented on May 23, 2024

I'm confused why dotnet/aspnetcore#14183 was closed as "no work to do" - can anyone shed light on that decision? This is the closest issue I can find.

I spent some time digging through the code in this repo trying to figure out why my ASPNETCORE 3.x app was not respecting the APPLICATION_NAME set up in my app configuration and learned that using the DefaultWebHostBuilder and configuring a Startup class injects an additional configuration provider (last so that it overrides my app configuration) and forces the app name to the AssemblyName of the DLL containing the Startup class.

I'm curious why it does not simply respect the APPLICATION_NAME as configured by IConfigurationBuilder instance returned from the ConfigureAppConfiguration method?

I'm using a Generic Host and then calling ConfigureWebHostDefaults, so maybe this is a holdover behavior in the Web Host from before the Generic Host was created?

It appears to place the Generic Host guidance for setting ApplicationName in conflict with the Web Host guidance for setting ApplicationName

Eventually I'm hoping that the responsibility of overriding the ApplicationName config setting can be removed from the web host responsibility and handled in a consistent way by the Generic Host

from saturn.

davidalpert avatar davidalpert commented on May 23, 2024

Apologies, I didn't even realize which repo this issue is in, after clicking through so many issues I think I got lost. ;-) will ask in the aspnet repos.

from saturn.

Krzysztof-Cieslak avatar Krzysztof-Cieslak commented on May 23, 2024

I'm not even sure if the bug is still there, but anyway, we can't do anything about it here - it's underlying ASP problem. So I'm closing this issue.

from saturn.

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.