Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Diego 25 posts 156 karma points
    May 31, 2024 @ 09:00
    Diego
    0

    Environment Type

    Hello, anyone know if Umbraco have an helper (or other), that will be possible know the environment type? "Local", "Development", "Live"...

    Thanks

  • Diego 25 posts 156 karma points
    May 31, 2024 @ 11:44
    Diego
    0

    Sorry i see that i used IHostEnvironement for that:

    IHostEnvironment hostEnv;
    
    string envName = hostEnv.EnvironmentName;
    

    This show: "Staging", "Development", "Production".

    For it local or development are the same and show "Development" in both case. But i need to know, when run on "Local", or "Development" or "Production" enviroment.

    Thanks.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies