在IIS中发布Aps.net MVC应用程序时bootstrap4 NavBar出现问题

时间:2018-10-27 05:29:19

标签: asp.net-mvc razor bootstrap-4

问题是我正在开发一个应用程序,并且在主屏幕上有一个菜单,该菜单由bootstrap4 navbar制成,从VS2017(iis expres)的navbar运行该应用程序,它显示正确,如何在下面显示图片:

NavBar displayed when running from VS2017 (iis express)

代码在这里:

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimun-scale1.0" />
    <title>@ViewBag.Title - Jedy Health</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")

</head>
<body>
    <div class="navbar navbar-expand-md navbar-dark mb-4 navbar-fixed-top" style="background-color:#0173c7" role="navigation">
        @Html.ActionLink("Jedy Health", "Index", "Home", new { area = "" }, new { @class = "navbar-brand titulo" })
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarCollapse">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle btn btn-success" id="dropdown1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Gestión Administrativa</a>
                    <ul class="dropdown-menu" aria-labelledby="dropdown1">
                        <li class="dropdown-item dropdown">
                            <a class="dropdown-toggle" id="dropdown1-1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Emergencias</a>
                            <ul class="dropdown-menu" aria-labelledby="dropdown1-1">
                                <li>@Html.ActionLink("Admisión de pacientes", "Index", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Pacientes en espera", "About", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Crear casos", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Agregar medicinas o materiales al acaso", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li class="dropdown-item dropdown">
                                    <a class="dropdown-toggle" id="dropdown1-1-1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Reportes</a>
                                    <ul class="dropdown-menu" aria-labelledby="dropdown1-1-1">
                                        <li>@Html.ActionLink("Hoja de ingreso", "Index", "Home", new { @class = "dropdown-item" })</li>
                                        <li>@Html.ActionLink("Estado de cuenta", "Index", "Home", new { @class = "dropdown-item" })</li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown-item dropdown">
                            <a class="dropdown-toggle" id="dropdown1-10" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Hospitalización</a>
                            <ul class="dropdown-menu" aria-labelledby="dropdown1-10">
                                <li>@Html.ActionLink("Opción 1", "Index", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Opción 2", "About", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Opción 3", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Opción 4", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li class="dropdown-item dropdown">
                                    <a class="dropdown-toggle" id="dropdown1-1-10" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Opción 5</a>
                                    <ul class="dropdown-menu" aria-labelledby="dropdown1-1-10">
                                        <li>@Html.ActionLink("Opción 5.1", "Index", "Home", new { @class = "dropdown-item" })</li>
                                        <li>@Html.ActionLink("Opción 5.2", "Index", "Home", new { @class = "dropdown-item" })</li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown-item dropdown">
                            <a class="dropdown-toggle" id="dropdown1-100" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Pre-admisión</a>
                            <ul class="dropdown-menu" aria-labelledby="dropdown1-100">
                                <li>@Html.ActionLink("Opción 1", "Index", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Opción 2", "About", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Opción 3", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Opción 4", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li class="dropdown-item dropdown">
                                    <a class="dropdown-toggle" id="dropdown1-1-100" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Opción 5</a>
                                    <ul class="dropdown-menu" aria-labelledby="dropdown1-1-100">
                                        <li>@Html.ActionLink("Opción 5.1", "Index", "Home", new { @class = "dropdown-item" })</li>
                                        <li>@Html.ActionLink("Opción 5.2", "Index", "Home", new { @class = "dropdown-item" })</li>
                                    </ul>
                                </li>
                            </ul>
                        </li>

                    </ul>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle btn btn-info" id="dropdown2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Gestión Médica</a>
                    <ul class="dropdown-menu" aria-labelledby="dropdown2">
                        <li>@Html.ActionLink("Cambiar paciente", "Index", "Home", new { @class = "dropdown-item" })</li>
                        <li>@Html.ActionLink("Datos personales", "Index", "Home", new { @class = "dropdown-item" })</li>
                        <li>@Html.ActionLink("Enfermedad actual", "Index", "Home", new { @class = "dropdown-item" })</li>

                        <li class="dropdown-item dropdown">
                            <a class="dropdown-toggle" id="dropdown2-1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Antecedentes</a>
                            <ul class="dropdown-menu" aria-labelledby="dropdown2-1">
                                <li>@Html.ActionLink("Antecedentes del infante", "Index", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Enfermedades anteriores", "About", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Antecedentes familiares", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Antecedentes alérgicos y hematológicos", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Antecedentes quirúrgicos y hospitalarios", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Hábitos psicobiológicos", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Antecedentes ginecológicos y obstétricos", "Contact", "Home", new { @class = "dropdown-item" })</li>
                            </ul>
                        </li>

                        <li class="dropdown-item dropdown">
                            <a class="dropdown-toggle" id="dropdown2-10" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Examen físico</a>
                            <ul class="dropdown-menu" aria-labelledby="dropdown2-10">
                                <li>@Html.ActionLink("Examen general y signos vitales", "Index", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Examen de la cabeza", "About", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Examen del cuello", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Examen del tórax", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Examen del abdomen y genitales", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Examen de las extremidades y neurológico", "Contact", "Home", new { @class = "dropdown-item" })</li>
                            </ul>
                        </li>

                        <li>@Html.ActionLink("Solicitudes", "Index", "Home", new { @class = "dropdown-item" })</li>
                        <li>@Html.ActionLink("Estudios y exámenes", "Index", "Home", new { @class = "dropdown-item" })</li>
                        <li>@Html.ActionLink("Diganóstico", "Index", "Home", new { @class = "dropdown-item" })</li>
                        <li>@Html.ActionLink("Indicaciones médicas", "Index", "Home", new { @class = "dropdown-item" })</li>
                        <li>@Html.ActionLink("Evolución", "Index", "Home", new { @class = "dropdown-item" })</li>
                        <li>@Html.ActionLink("Informe de enfermería", "Index", "Home", new { @class = "dropdown-item" })</li>
                        <li>@Html.ActionLink("Observaciones", "Index", "Home", new { @class = "dropdown-item" })</li>
                        <li>@Html.ActionLink("Servicio de maternidad", "Index", "Home", new { @class = "dropdown-item" })</li>

                        <li class="dropdown-item dropdown">
                            <a class="dropdown-toggle" id="dropdown2-100" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Servicios quirúrgicos</a>
                            <ul class="dropdown-menu" aria-labelledby="dropdown2-100">
                                <li>@Html.ActionLink("Intervención quirurgica", "Index", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Evaluación pre-anestésica", "About", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Unidad de recuperación post-anestésica", "Contact", "Home", new { @class = "dropdown-item" })</li>
                            </ul>
                        </li>

                        <li>@Html.ActionLink("Informe de egreso", "Index", "Home", new { @class = "dropdown-item" })</li>

                        <li class="dropdown-item dropdown">
                            <a class="dropdown-toggle" id="dropdown2-1000" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Reportes</a>
                            <ul class="dropdown-menu" aria-labelledby="dropdown2-1000">
                                <li>@Html.ActionLink("Reposo médico", "Index", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Reposo quirurgico", "About", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Constancia para acompañantes", "Contact", "Home", new { @class = "dropdown-item" })</li>
                                <li>@Html.ActionLink("Informe médico para tratamiento", "Contact", "Home", new { @class = "dropdown-item" })</li>
                            </ul>
                        </li>

                    </ul>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle btn btn-secondary" id="dropdown3" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Configuración</a>
                    <ul class="dropdown-menu" aria-labelledby="dropdown3">
                        <li>@Html.ActionLink("Parámetros generales", "Index", "Home", new { @class = "dropdown-item" })</li>
                    </ul>
                </li>
            </ul>
            @Html.Partial("_LoginPartial")
        </div>
    </div>  
    
    <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - Jedy Systems C.A.</p>
        </footer>
    </div>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @Scripts.Render("~/bundles/navbar")
    @RenderSection("scripts", required: false)
</body>
</html>

要让客户端访问,请查看进度并提出意见,我将应用程序放置在IIS Web服务器上,以供以后访问,发现该服务器本身(Windows Server 2012)和工作站中的导航栏是显示不正确,显示如下:

NavBar shown when opening the application from iis in windows server 2012

如您所见,导航栏的许多详细信息在Windows Server 2012 IIS中丢失。

我想表达您的宝贵意见,以查看是否有可能解决此问题,任何信息,代码部分或任何需要帮助的信息,请告诉我。

预先感谢和问候。

0 个答案:

没有答案