Images not displayed in .Net web application in Azure

I have succesfully deployd Web application and its database to Azure. I can login to the application and, but none of pictures are not displayed correctly.

For example following are displayd: <img src="images/logo.jpg" alt="project" align="top"></a>

How to make pictures wo

February 10th, 2012 8:17am

There could be several reasons why the images are not showing:

  • Did you include the images in your project? (make sure the images folder + files are visible in your VS solution)
  • Is the images folder in really the root of your project? Consider using VirtualPathUtility.ToAbsolute to prevent issues with the relative path to your content.
  • Did you set up security in your web.config? If yes, you could try to grant read access for all users to your images folder.

What type of webrole did you deploy? ASP.NET? ASP.NET MVC? PHP?

Sandrino

Free Windows Admin Tool Kit Click here and download it now
February 10th, 2012 8:28am

-Solution explorer in VS2010 displays images folder under the project name.

-Images folder is located on development machine in inetpub\wwwroot\projectname\images

-No security is specifically defined in web.config.

-This is ASP.NET application

Browser is refering to logo as following:http://1111111111111111111111111111.cloudapp.net/images/logo.jpg

In VS2010, when I click View in browser it correctly shows all image links at browser on http://localhost/project/images/

WHY PICTURES ARE MISSING IN AZURE? Images are no uploaded to Azure automatically and I need to upload separately to Azure?

February 10th, 2012 9:28am

Hi,

It seems that the image files doesnt exists in the Azure VM. Please follow the below steps:

  1. In Solution Explorer, Go to the Images folder.

  2. Select all the images inside the image folder.

    The properties associated with the selected images appear in a list in the Properties window.

  3. In the properties window, Select Copy Local from the left-hand column, and then click the arrow in the right-hand column to change the value to True.

  4. Rebuild the project and redeploy in Azure.

It should resolve the issue.

Free Windows Admin Tool Kit Click here and download it now
February 10th, 2012 11:05am

Thanks. What is see that images folder in solution explorer have no option to open it. So I don't see images in VS2010 solution explorer. The application works fine on OnPremise also this way.

What I should do?

February 10th, 2012 11:17am

Hi,

Please verify the path where the images are being referenced from. I think in your case, they may not be present in image folder.

Free Windows Admin Tool Kit Click here and download it now
February 10th, 2012 11:29am

For me, I've added images into source control however forgot to check in the project hence images were not deployed. Once I checked in the project, Azure build deployed the files
March 22nd, 2015 1:13am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics