User497297161 posted
I have an aspnetboilerplate application deployed in IIS (tried 8.5 and 10), there are following errors when access from chrome:
fontawesome-webfont.woff2:1 Failed to load resource: the server responded with a status of 404 (Not Found)
user-img-background.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
fontawesome-webfont.woff:1 Failed to load resource: the server responded with a status of 404 (Not Found)
fontawesome-webfont.ttf:1 Failed to load resource: the server responded with a status of 404 (Not Found)
In console window of Chrome:</div> <div>there are something like:
http://47.94.194.xx:8081/Bundles/fonts/fontawesome-webfont.woff2?v=4.6.3 404 (Not Found)
http://47.94.194.xx:8081/Bundles/fonts/user-img-background.jpg ... 404 (Not Found)
Below is my resource files structure:
/Content/font-awesome.css</div> <div>/css/style.css
/fonts/fontawesome......
/images/user-img-background.jpg
In style.css reference the user-img-background.jpg as below:
background: url("../images/user-img-background.jpg") no-repeat no-repeat;
In font-awesome.css reference those 404 font files
I also registered the bundles in _Layout.cshtml as:
@Styles.Render("~/Bundles/vendor/css")
My bundleconfig is like (take style.css as example):</div> <div>bundles.Add(
new StyleBundle("~/Bundles/vendor/css")
...........
.Include("~/css/*.css", new CssRewriteUrlTransform())
...........
);
Could anyone tell why user-img-background.jpg cannot be found?
Note: in IIS added all MIME types.
Thanks!