Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Missing img's from metronic layout4 #588


User avatar
0
alukaszewski created

I have noticed that when I publish my website to an IIS server (local or remote) there seems to be an issue that prevents the site from locating some of the .png files used in the css. When I build/run the project in VS using the inbuilt IISExpress, everything renders correctly and using Google Chrome to inspect the page I see that the menu-toggler in the light.css is resolved to "http://localhost:6234/metronic/assets/admin/layout4/img/sidebar-toggle-light.png".

However, when the site is published to IIS, the debug tools in chrome show error 404 when trying to find the .png files for the menu-toggler and the close button on the sample note portlet. Using the Google Chrome Page inspector the url it is looking for do not exist:

"http://mysite.mydomain.com/Bundles/img/sidebar-toggle-light.png" "http://mysite.mydomain.com/Bundles/Mpa/img/remove-icon-small.png"

In fact, you can see the second url there is also different from the first, even though the .png files are in the same folder. I verified that both files exist by typing in their URL manually as below, and they exist.

"http://mylivesite.mydomain.com/metronic/assets/admin/layout4/img/sidebar-toggle-light.png" "http://mylivesite.mydomain.com/metronic/assets/global/img/remove-icon-small.png"

So there doesn't seem to be a file missing/publishing error - more some sort of code/IIS issue with how the 'bundle' config works?

What gives?


6 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Thank you very much for pointing out this problem. I created an issue to follow it: <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/issues/91">https://github.com/aspnetzero/aspnet-zero/issues/91</a> This is because of bundling (which only runs on release, not debug).

  • User Avatar
    0
    alukaszewski created

    I just noticed that this issue also manifests itself in the ASP.NET Zero demo we created, so I am glad it is not something I am doing wrong.

    I have requested access to the GitHub repository so that I can follow this issue.

  • User Avatar
    0
    alukaszewski created

    I see that this issue has been resolved in 1.7.0 - how do I know which code or files to replace to fix this issue in 1.6.1.0? Do I need to upgrade all files to 1.7.0 - if so, what about my customisations to PageNames.cs etc.

    Andy

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    You can see the issue (<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/issues/95">https://github.com/aspnetzero/aspnet-zero/issues/95</a>) and related commit to Github (<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/commit/05e94c93741a43761c78bf92e841588374ac153b">https://github.com/aspnetzero/aspnet-ze ... 8374ac153b</a>) So, you can know which files are changed for an issue.

    AspNet Zero is a starter template. So, when you customize the code, there is no automatic way of getting new version changes (you can try automatic or manual merging), as explained in FAQ: <a class="postlink" href="http://www.aspnetzero.com/Faq">http://www.aspnetzero.com/Faq</a> (see HOW TO UPGRADE EXISTING APPLICATIONS WHEN A NEW VERSION IS AVAILABLE? section).

    Thanks, Have a nice day.

  • User Avatar
    0
    alukaszewski created

    I have removed the mpa/bundles files and also modified the .vbproj file to remove the include entries for the .css files as per the commits in GitHub, but the issue remains. When I publish the Release version I am getting 404 for the "/Bundles/img/sidebar-toggle-light.png", but if I publish the debug version of the project the file url is coming from "/metronic/assets/admin/layout4/img/sidebar-toggle-light.png" and works OK.

    Why is the Release version going for the /Bundles folder and not the /metronic folder?

  • User Avatar
    0
    alukaszewski created

    Figured it out. I had to republish the site and enable the option to remove extra files. Release version on production server now looking great!