Forums - C# Corner

Forum guidelines
satish kumar

satish kumar

  • 1.3k
  • 10
  • 36.6k

How to Prevent direct access to files and folders in asp.net

Aug 17 2011 5:20 AM
Hi everyone
can you any one tell me how to prevent files from directory when the user trying to access files directly.
when he tries to access files it should ask login
in my directory i have [.xls, .doc, .pdf files]

how to do this.
if by authentication and authorization how...?
is there any alternate...to do this..?

Answers (2)

Unlimited Flat-Free License

SPONSORED BY

File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!