Search code examples
c#asp.net-mvcimageserver-side

How can ı display image in server side


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:?


Solution

  • 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