locked
I want to add schedule maintenance message to the application to the higher and lower environments. RRS feed

  • Question

  • I want to add schedule maintenance message to the application to the higher and lower environments. If its higher environment one message is displayed if its lower another is displayed. please suggest how to write based on environment.

    For me both the texts are displaying please suggest

    footer.cshtml:
            <ul class="nav nav-list">
                <!--Added as part of PVR-8416-->
                @if (Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["IsDemo"]) == true)
                {

                    <li>Weekly Maintenance Window: Sundays, 12:00 AM - 8:00 AM ET</li>
                }
                @if (Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["IsProd"]) == true)
                {

                      <li>Monthly Deployment Window: Second Monday, 12:00 AM - 8:00 AM ET</li>
                                }
            </ul>
    and 
    web.config:
        <add key="IsDemo" value="true"/>
        <add key="IsProd" value="true"/>




                                    
    • Moved by CoolDadTx Tuesday, November 10, 2020 2:38 PM ASP.NET related
    Tuesday, November 10, 2020 1:47 PM

All replies

  • This forum is for C#-specific questions. Please post questions related to MVC and web applications in the ASP.NET forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Tuesday, November 10, 2020 2:38 PM