TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sachin londhe
NA
14
1.4k
How to download file with read only in ASP .NET website?
Mar 2 2018 8:43 AM
I have a file present on server. The file on server is read-only. When I download the file from ASP .NET application to my local machine, the file has read and write access both. The original read-only attribute removed. I want to download the file read-only mode. Could you please suggest the proper solution for this problem. I have tried below solution. Response.ContentType = "application/pdf"; Response.AppendHeader("Content-Disposition", "attachment; filename=MyFile.pdf"); Response.TransmitFile(Server.MapPath("~/Files/MyFile.pdf")); Response.End(); On server, this file has read-only attribute, but if I download using above code, the read-only attribute remove automatically in client location. I want to prevent file read-only after downloading. Please suggest some solution.
Reply
Answers (
2
)
by one clicking send data to Email and database
Free online test for MCSD 70-486