[英]Access file outside of server or root in asp.net
我想查看項目或驅動器之外的文件。 為此,我在web.config中添加了一個具有目標位置值的鍵。 即
<add key="fileuploadView" value="file:///D:\SubhrasData\xyz\I3ms\mis\doc\" />
現在我以以下方式獲得道路
Dim path As String = ConfigurationSettings.AppSettings("fileuploads")
並指定使用超鏈接查看文件的路徑。
即hypSpCertificate.NavigateUrl = path & gObjDt.Rows(0)("VCH_DOC_PATH")
但首先搜索其文件夾(在localhost中)。 但我希望它應該直接搜索給定文件路徑。
您正在使用名稱“ fileuploadView”在鍵中分配值,並通過“ fileuploads”獲取它。
Dim path As String = ConfigurationSettings.AppSettings("fileuploadView");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.