Did I miss a change to IIS deployment?

Hi Adam,

Unfortunately I’ve found that if I remove ‘position’ = “fixed”, I can no longer access the hamburger menu options to navigate as they appear behind my udgrids.

should be

image

Any ideas?

There you go.

Hi, thanks.

That makes sense - I already have z-index set to 9999, however when I remove ‘position’ = “fixed” as suggested by adam, it breaks. Looking at the z-index documentation it says

Note: z-index only works on positioned elements (position: absolute, position: relative, position: fixed, or position: sticky).

So if I remove position then the nav bar breaks, but the admin section is working, and if I add it then the nav bar works but the admin section breaks :smiley:

Let me futz with it a bit more. I hadn’t realized the issue with the navbar.

Can you try this?


      '.sidenav'= @{
          'background-color' = "#1c1c1c"
          'z-index' = "9999"
          'color'= "#FFF"
          "position" = "fixed"
      }

image

Here’s my full theme.

$FontFamily = '"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif'

$PrimaryColor = "#1C1C1C"
$PrimaryColorDark =  "#FFFFFF"
$AlternativeBackgroundColor3 = "#252525"
$AlternateFontColor = "#FFFFFF"

@{
  Name = "Azure"
  Definition = @{
      UDDashboard = @{
          BackgroundColor = "#333333"
          FontColor = "#FFFFFF"
      }
      UDNavBar = @{
          BackgroundColor =  $PrimaryColor
          FontColor = $AlternateFontColor
      }
      UDFooter = @{
          BackgroundColor =  $PrimaryColor
          FontColor = "#FFFFFF"
          "margin-top" = "4% !important"
      }

      UDCard = @{
          BackgroundColor = "#252525"
          FontColor = "#FFFFFF"
      }
      UDChart = @{
          BackgroundColor = "#252525"
          FontColor = "#FFFFFF"
      }
      UDMonitor = @{
          BackgroundColor = "#252525"
          FontColor = "#FFFFFF"
      }
      UDTable = @{
          BackgroundColor = "#252525"
          FontColor = "#FFFFFF"
      }
      UDGrid = @{
          BackgroundColor = "#252525"
          FontColor = "#FFFFFF"
      }
      UDCounter = @{
          BackgroundColor = "#252525"
          FontColor = "#FFFFFF"
      }
      UDInput = @{
          BackgroundColor = "#252525"
          FontColor = "#FFFFFF"
      }

      'p' = @{
          'color' = '#FFFFFF !important'
      }

      UDTabs = @{
        BackgroundColor = $AlternativeBackgroundColor3
        Height = 'auto'
        BoxShadow = 'unset'
        FontFamily = $FontFamily

    }

    UDTab = @{
        FontColor = $PrimaryColor
        FontFamily = $FontFamily
        # No need for backgroundColor it inherit UDTabs backgroundColor
    }

    UDTabActive = @{
        ActiveFontColor = $AlternateFontColor
        ActiveBackgroundColor = $PrimaryColor
    }

    UDTabIcon = @{
        FontColor = $PrimaryColor
        Height = 'auto'
        LineHeight = 'inherit'
    }

    UDTabActiveIcon = @{
        ActiveFontColor = $AlternateFontColor
    }

    UDTabIndicator = @{
        IndicatorColor = $PrimaryColorDark
    }

      '[type="radio"]:checked + span::after' = @{
          'background-color' = "#FFFFFF"
      }
      
      '.pagination li a'= @{
          'color' = "#FFFFFF !important"
      }
      'input:not([type]), input[type="date"]:not(.browser-default), input[type="datetime-local"]:not(.browser-default), input[type="datetime"]:not(.browser-default), input[type="email"]:not(.browser-default), input[type="number"]:not(.browser-default), input[type="password"]:not(.browser-default), input[type="search"]:not(.browser-default), input[type="tel"]:not(.browser-default), input[type="text"]:not(.browser-default), input[type="time"]:not(.browser-default), input[type="url"]:not(.browser-default), textarea.materialize-textarea' = @{
          'border-bottom' = "1px solid #FFFFFF"
          'color'= "#FFFFFF"
      }
      '.select-wrapper input.select-dropdown'= @{
          'color'= "#ffffff"
          'border-bottom' = "1px solid #FFFFFF"
          'border-block-end-color' = "#FFFFFF"
      }
      '.dropdown-content'= @{
          'background-color' = "#333333"
      }
      '.btn'= @{
          'color'= "#1c1c1c"
          'background-color' = "#bababa"
      }
      '.btn:hover'= @{
          'color'= "#000000"
          'background-color' = "#FFFFFF"
      }
      '.btn-floating'= @{
          'color'= "#1c1c1c"
          'background-color' = "#bababa"
      }
      '.select-dropdown li span' = @{
          'color' = "#ffffff"
      }

      '.sidenav'= @{
          'background-color' = "#1c1c1c"
          'z-index' = "9999"
          'color'= "#FFF"
          "position" = "fixed"
      }


      '.sidenav a:hover'= @{
          'background-color' = "#1e353f"
          'color'= "#FFFFFF"
      }
      '.sidenav li > a' = @{
          'color'= "#f1f1f1"
      }
      'li'= @{
          'color' = "#FFFFFF"
      }
      '.collapsible-header'= @{
          'background-color' = "#252525"
          'border-bottom' = '1px solid #1c1c1c;'
          'border-bottom-width' = '1px;'
          'border-bottom-style' = 'solid;'
          'border-bottom-color' = '#1c1c1c;'
      }
      '.collapsible' = @{
          'margin' = ".5rem 0 1rem"
          'border' = 'none'
      }

      '.collapsible-body' = @{
          'border-bottom' = 'none'
          "background-color" = "#252525"
      }
      'h'= @{
          "color" = "#fff !important"
      }
      'h3, h4' = @{
          'line-height' = "110%"
          'color' = "#fff"
      }

      '.collection .collection-item'= @{
          'background-color' = "#252525"
      }
      '.pagination li.active' = @{
          'background-color' = "#FFFFFF"
      }
      
      '.sidenav .collapsible-header, .sidenav .collapsible li, ul:not(.browser-default)'= @{
          'color'= "#fff !important"
          'background-color' = "#1c1c1c !important"
      }
      
      '.card .card-action a:not(.btn):not(.btn-large):not(.btn-small):not(.btn-large):not(.btn-floating)'= @{
          'color'= "#FFFFFF"
          'margin-right' = "24px"
          '-webkit-transition' = "color .3s ease"
          'transition'= "color .3s ease"
          'text-transform'= "uppercase"
      }
      '.btn-flat' = @{
          'color' = "#fff"
      }
      '.sidenav .subheader' = @{
          'color' = "#fff"
      }
      '.svg-inline--fa' = @{
          'color' = "#fff"
      }
      '.modal'= @{
          'color' = "#FFFFFF"
          'background-color' = "#333333"
      }
  }
}
  

how did you get it working the new way? I’m just getting a ton of errors in IIS. What do your web.configs look like?

Hi @artvandelay440 What exactly is your problem?
My web.config looks like this. I am using UniversalDashboard 2.9.0 and powershell 7. I am logging to the logs subfolder of my web.config root directory (stdoutLogFile). You can remove the complete rewrite (including <rules>) block if you do not like the http to https redirect and you can remove (or set to false) forwardWindowsAuthToken="true" and requestTimeout="09:00:00".
The dashboard.ps1 file should also be located in the web.config root directory of your website.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <!--
    Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
  -->
  <system.webServer>
    <security>
      <!-- <requestFiltering removeServerHeader ="true" /> -->
    </security>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="C:\Program Files\PowerShell\7\pwsh.exe" arguments=".\dashboard.ps1" stdoutLogEnabled="true" stdoutLogFile=".\logs\\stdout" forwardWindowsAuthToken="true" requestTimeout="09:00:00" />
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By" />
      </customHeaders>
    </httpProtocol>
    <rewrite>
      <rules>
        <rule name="Rewrite_HTTP_HTTPS" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
            <add input="{HTTPS}" pattern="^OFF$" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

A default web.config should look similar to this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <!--
    Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
  -->
  <system.webServer>
    <security>
      <!-- <requestFiltering removeServerHeader ="true" /> -->
    </security>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" arguments=".\dashboard.ps1" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\stdout" forwardWindowsAuthToken="false" />
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By" />
      </customHeaders>
    </httpProtocol>  
  </system.webServer>
</configuration>
1 Like