asked    Primo     2018-10-12       iis       33 view        1 Answer

[SOLVED] The images do not show on page after publishing the web-application on IIS

The images do not show on page after publishing the web-application on IIS.

When I run the web-application from Visual Studio 2015, the pictures are appear correctly.the path of image is like


But after publishing the web-application on IIS and run it, the pictures do not show. But when I add manually the domain at first of above path, the image show correctly. same as


I've used Umbraco 7.4.3, ASP.NET MVC, VS2015 and Windows 10.


How can I solve this problem? Please help me.


<?xml version="1.0" encoding="utf-8" ?>



      <!-- the email that should be used as from mail when umbraco sends a notification -->

    <!-- Show property descriptions in editing view "icon|text|none" -->

    <!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
      <![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;z-index: 9999999;" href="" OnClick=" = '{0}/endPreview.aspx?redir={2}'"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>

    <!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
    <!-- In seconds. 0 will disable cache -->

    <!-- How Umbraco should handle errors during macro execution. Can be one of the following values:
         - inline - show an inline error within the macro but allow the page to continue rendering. Historial Umbraco behaviour.
         - silent - Silently suppress the error and do not render the offending macro.
         - throw  - Throw an exception which can be caught by the global error handler defined in Application_OnError. If no such
                    error handler is defined then you'll see the Yellow Screen Of Death (YSOD) error page.
         Note the error can also be handled by the umbraco.macro.Error event, where you can log/alarm with your own code and change the behaviour per event. -->

    <!-- These file types will not be allowed to be uploaded via the upload control for media and content -->

    <!-- Defines the default document type property used when adding properties in the back-office (if missing or empty, defaults to Textstring -->

    <!-- set to true to auto update login interval (and there by disabling the lock screen -->
    <!-- change in 4.8: Disabled users are now showed dimmed and last in the tree. If you prefer not to display them set this to true -->

    <!-- this will ensure that urls are unique when running with multiple root nodes -->
    <!-- this will add a trailing slash (/) to urls when in directory url mode -->

    <!-- To switch the default rendering engine to MVC, change this value from WebForms to Mvc -->

    <!-- add tasks that should be called with an interval (seconds) -->
    <!--    <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->

  <!-- distributed calls must be enabled when using Umbraco in a load balanced environment -->
  <distributedCall enable="false">
    <!-- the id of the user who's making the calls -->
    <!-- needed for security, umbraco will automatically look up correct login and passwords -->

    When distributed call is enabled, you need to add all of the servers part taking in load balancing
    to the server list below. 


    internalRedirectPreservesTemplate="false" disableAlternativeTemplates="false" disableFindContentByIdPath="false"


I've used img tag in my cshtml file like this:

<img style="display: block;" src="" alt="@Model.Model.FirstTitle">

  1 Answer  

        answered    Lawrence     2018-10-12      

Sometimes if you add images in project not in usual way to include, it will not update images in build/packages, which you are submitting to IIS. Make your image in solution explorer, right click the image in solution explorer and choose properties then select "Copy always" and build project. Then publish to IIS.

enter image description here

Your Answer

 2018-10-12         Celeste

Custom Sections & Custom Trees MVC approach

I have spent hours and hours trying to get a custom tree to show up in a custom section in umbraco. - With out success.So far I have managed to create a new section, but when I click that section nothing happens.What should happen is a custom tree should be displayed with one node. When you click that node It should display an MVC view.This is what I have done so far, it is based around this tutorial. Create the section{ [Applicati...                     1 answers                     13 view
 2018-10-12         Olive

How To call An Action In Umbraco Controller?

I created an Umbraco DocumentType with the alias Personal and created a controller that inherits Umbraco.Web.Mvc.RenderMvcControllerI added two Actions, one is the default action and the other is called Test. How can I fire the Test Action from the Personal controller?public class PersonalController : Umbraco.Web.Mvc.RenderMvcController{ // GET: Personal public override ActionResult Index(RenderModel model) { return base.Index(model); } public String Test(RenderModel model) { return "fff"; }}When I put the url like this: localHost/persona...                     1 answers                     15 view
 2018-10-12         Darlene

How to get descendants from current page in Umbraco 7?

I have a document type with alias dArticlesMain, and for this page I have the following structure.dArticlesMaindArticlesCategory1Article1Article2Article3dArticlesCategory2Article1Article2Article3dArticlesCategory3Article1Article2Article3I'm on dArticlesMain and i want to display all the descendants (Articles) and skip it's childrens (dArticlesCategory)I have this code which display all the childrens (dArticlesCategory) and the descendants (Articles) also when i use the Article properties it's through an error. <ul> @foreach(var page in Model.Content.Descendants()) ...                     1 answers                     16 view