My server url is something like 192.1.1.1:123 and my images folder in server is F:\images\1234.jpg but I published the website in C:\inetpub\wwwroot\

How can I refer to images from F:?

2 Answers

1
Ali Abdollahi On Best Solutions

consider using virtual directory

   <application path="/files">
      <virtualDirectory path="/Images" physicalPath="F:\images" />
   </application>

then in browser accessing images from 192.1.1.1:123/files/images/1234.jpg

-1
Promis Patel On

Mode - 1

Read the image file in browser.

Implement this way in your code file.

ex.~/Content/images/img1.png

Mode - 2

After publish the code in this URL 192.1.1.1:123 then after follow the below step.

  • Run URL in browser.
  • Right click image and open in new tab then copy the URL. ex. //192.1.1.1:123/Content/images/img1.png
  • Paste the URL in the code you need.