Acessing file from physical location securely

2019-09-06 10:55发布

I have a .docx file stored at one of the physical disk. Now from c# code I am trying to access.File is accessible but internet explorer is giving a warning message like "Only Secure content is displayed"

Here is the code

 string fileLocation = new Uri(vpathwithPageNum).LocalPath; // Value = `//Servername/Detail/abc.docx
 File.SetAttributes(fileLocation, FileAttributes.ReadOnly);

File location is like file://Servername/Detail/abc.docx. If I try to read file like //Servername/Detail/abc.docx, its saying content cant be displayed.

Any help will be highly appreciated.

0条回答
登录 后发表回答