如何在ASP.NET,IIS7中显示Web根文件夹外的图像? [英] How do I display image outside web root folder in ASP.NET, IIS7?
本文介绍了如何在ASP.NET,IIS7中显示Web根文件夹外的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的兄弟们
我有一个文件夹包含网络驱动器中的图像(\\\\ pmls \Images)。我正在开发一个webapp并将其部署在Web服务器上(与文件服务器(网络驱动器)分开。如何在asp.net中显示带图片框的图像?
我尝试了什么:
我尝试设置ImageUrl =\\\\\\\\\\\\\\ ;但是在运行网页时无法显示图像。
解决方案
IIS是否知道网络文件夹?如果没有,请阅读:
如何:创建和配置虚拟目录和IIS 7.0中的应用程序 [ ^ ]
Dear brothers
I have a folder contains images in a network drive (\\pmls\Images). I am developing a webapp and deploy it on a web server (separated from file server (network drive). How do i display image with picture box in asp.net?
What I have tried:
I try to set ImageUrl="\\pmls\Images\test.jpg"; But cannot display image when run web page.
解决方案
Does IIS know about the network folder? If not, then read this:
How to: Create and Configure Virtual Directories and Applications in IIS 7.0[^]
这篇关于如何在ASP.NET,IIS7中显示Web根文件夹外的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文