Benjamin Benjamin
Benjamin Benjamin

Reputation: 55

Asp.net Azure WebApp publish Website but no Picture

I published my azure website (asp.net with c# controller) as a WebApp but when I call the website there are no picture.

If I deploy the website on LocalHost I can see the picture.

        <img class="img-responsive" style="height:90%;width:90%" src="../Content/images/test.png" />

I also tried to change the path to:

src="~/Content/images/test.png" /

src="/Content/images/test.png" /

But after uploading the webapp I cannot see any picture.

In other question I read that I have to use Azure Blob Storage. But I just have a few (ca. 5 picture) on my website. Maybe there is a simpler way?

Or is it possible to upload the file and create the image folder in the azure portal?

Upvotes: 1

Views: 1537

Answers (2)

karthik kasubha
karthik kasubha

Reputation: 424

Right click on image folder of the project and Include in project did the trick for me, earlier it was excluded from the project.

Upvotes: 0

Sujit.Warrier
Sujit.Warrier

Reputation: 2869

i think its because the images folder is not created after publishing. just drag and drop a file in to this folder in your visual studio. then publish the images will appear. having a file in the folder tells visual studio that this folder needs to be published

Upvotes: 2

Related Questions