Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Use multiple environments in ASP.NET Core #10212


User avatar
0
TimMackey created

ANZ does not conform to .NET convention, here:

https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-5.0

Request ANZ conform to convention (and ignore "appsettings.json").

Refer to #10197


9 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @timmackey,

    AspNet Zero uses current environment name to determine the correct appsettings.json file. So, if you set ASPNETCORE_ENVIRONMENT in your Azure account, AspNet Zero will use appsettings.ASPNETCORE_ENVIRONMENT.json file.

  • User Avatar
    0
    TimMackey created

    Starting with version 8.7.0 it appears. I'm at 8.1.0.

  • User Avatar
    0
    musa.demir created

    Hi @timmackey I could not reproduce the problem. Can you please try to reproduce it in clean project.

  • User Avatar
    0
    TimMackey created

    project files emailed to [email protected]

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @timmackey

    How can we reproduce this problem ? What should we look for ?

    Thanks,

  • User Avatar
    0
    TimMackey created
    1. Publish .Web.Host app
    2. notice 'appsettings.Development.json' file has been transferred to server.
    3. go to the domain login page. CORS errors occur.
    4. delete 'appsettings.Development.json' file on server.
    5. go to domain login page. No CORS error. Page displays normally.

    Despite server environment being set correctly, the 'appsettings.Development.json' is not ignored.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @timmackey

    Thanks, we got the project this time and will check it.

    Thanks,

  • User Avatar
    0
    TimMackey created

    Wondering if any progress has been made in determining a solution?

  • User Avatar
    0
    TimMackey created

    ANZ Team:

    It's been almost 3 weeks since I sent my project to you, as requested. Wondering what the ETA is for a solution?