title: IIS can't load image from UNC path nor Virtual directory
body: <p>I just mounted a web site locally with IIS manager. I can access the site from the path <code>http://192.168.154.2/Default.aspx</code> and I have a folder named Affiche which contains some images and is situated in a remote server from the same network.</p>
  <p>To access an image I am using an aspx page GetImage.aspx which work like this:</p>
  <pre><code> var path = &quot;//192.168.84.52/Distri/Affiche/10038P.jpg&quot;
  
      if ((string.IsNullOrEmpty(imageName) == false))
      {
  
          try
          {
              // Retrieving the image
              System.Drawing.Image fullSizeImg;
              fullSizeImg = System.Drawing.Image.FromFile(path);
              // Writing the image directly to the output stream
              fullSizeImg.Save(Response.OutputStream, ImageFormat.Jpeg);
              // Cleaning up the image
              fullSizeImg.Dispose();
          }
  
          catch (System.IO.FileNotFoundException)
          {
              //MessageBox.Show(&quot;There was an error opening the bitmap.&quot; +
              //    &quot;Please check the path.&quot;);
          }
      }
  </code></pre>
  <p>This solution works fine in localhost ( with Visual Studio), I an perfectly get the image with a link like this <code>http://localhost:3606/GetImage.aspx</code>, however <code>http://192.168.154.2/GetImage.aspx</code> does not work. It will only show a broken image icon.</p>
  <p>The remote can be accessed from my computer ( which already input the login) where I have installed the web server.</p>
  <p>I tried another solution by using this solution : <a href="http://msdn.microsoft.com/en-us/library/bb763173%28v=vs.100%29.aspx" rel="nofollow noreferrer">a virtual directory</a></p>
  <p>From the IIS manager I can perfectly view the files from the remote server, but when I try to access the virtual folder like this: <code>http://192.168.154.2/afficheImage/20772G.jpg</code></p>
  <p>I have an 500.19 error with insufficient permissions.</p>
  <p>Is there a way to solve this please?</p>