Answer the question
In order to leave comments, you need to log in
Images are not displayed in release mode in asp.net mvc, how to fix?
Hello! I've been struggling with this problem for a long time and can't figure out what to do.
I have a project on asp.net mvc, for styles and scripts I used bundles:
public static void RegisterBundles(BundleCollection bundles)
{
BundleTable.EnableOptimizations = true;
bundles.Add(new StyleBundle("~/Content/CSS/styles").Include(
"~/Content/CSS/main.css",
"~/Content/CSS/remodal.css",
"~/Content/CSS/owl.carousel.css"));
bundles.Add(new ScriptBundle("~/Scripts/app")
.Include("~/Scripts/*.js"));
bundles.Add(new ScriptBundle("~/Scripts/libs/app")
.Include("~/Scripts/libs/*.js"));
}
<system.web>
<compilation debug="false">
<assemblies>
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
</system.web>
background: url("Images/logo.png") 0 0;
Answer the question
In order to leave comments, you need to log in
As a result, the problem turned out to be in these lines in web.config:
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
</handlers>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question