Images do not appear on the website published on the web server

1

Good afternoon guys, I have published a website on the WEB server, but no image is being displayed in the browser.

All images are displayed as follows:

<img src="~/imagens/logo.png"

Location displays normally. But not on the server. I already checked that the images exist in this directory. I've also tried modifying the view's code to display the full URL (" link "), but it also did not work.

The problem is occurring with css. It does not display the site with the correct formatting.

Is there a setting that should be made in this directory within the server or in the iss for the images to appear?

I have already checked the IIS installation, enable or disable features in windows, and static content is enabled.

    
asked by anonymous 29.07.2016 / 22:38

1 answer

1

change to

<img src="@Url.Content("~/imagens/logo.png")" />

Because you are using a virtual directory inside the main site in IIS and the way it was ~/ it will look in the root folder of IIS

    
01.08.2016 / 13:38