Bundle problem on the server

2

Good morning, I was implementing the use of bundle in my ASP.NET MVC project, in the development environment worked perfectly. But when I go to the server it does not work. I was debugging in the browser and it gives the following return: "Resource interpreted as Stylesheet but transferred with MIME type text / html"

Could someone give me some hint how to solve this problem?

BundleConfig.cs:

        bundles.Add(new StyleBundle("~/auth/css").Include(
            "~/Content/assets/bootstrap/css/bootstrap.css",
            "~/Content/assets/css/user.css",
            "~/Content/font/css/font-awesome.min.css"));

View where I make the call:

<html>
<head>
    <title>Recuperar Senha</title>
    @Styles.Render("~/auth/css")
</head>
<body>
    <div class="container">
        <div id="loginbox" style="margin-top:50px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
            <div class="panel">
                <div class="panel-heading">
                    <a class="pull-left" href="@Url.Action("Login")"><i class="fa fa-backward"></i> voltar</a>
                    <div class="panel-title text-center">Esqueceu sua Senha - PráticoERP</div>
                    <hr />
                </div>
                <div style="padding-top:30px" class="panel-body">

                    @Html.Partial("_AlertMessage")

                    @using (Html.BeginForm())
                    {
                        <div style="margin-bottom: 25px" class="input-group">
                            <span class="input-group-addon"><i class="fa fa-user"></i></span>
                            @Html.TextBox("login", null, new { @class = "form-control", placeholder = "Login" })
                        </div>

                        <div style="margin-bottom: 25px" class="input-group">
                            <span class="input-group-addon"><i class="fa fa-bookmark"></i></span>
                            @Html.TextBox("email", null, new { @class = "form-control", placeholder = "Email" })
                        </div>

                        <div style="margin-top:10px" class="form-group">
                            <div class="col-sm-12 controls">
                                <button type="submit" class="btn btn-lg btn-block btn-success" disabled>Recuperar senha</button>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-md-12 control">
                                <hr />
                                <div>
                                    Não tem conta?
                                    <a href="@Url.Action("Contato", "Auth")">Entre em contato</a>
                                </div>
                            </div>
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>
</body>
</html>

Thank you in advance.

    
asked by anonymous 07.07.2016 / 16:33

1 answer

2

You need to install the Static Content feature of IIS so that CSS files are distributed with the correct MIME type. This setting can be done through the Enable or Disable Windows Features menu :

    
07.07.2016 / 16:52