Last post Mar 02, 2018 04:13 PM by mgebhard
Mar 02, 2018 02:26 PM|londhess|LINK
Mar 02, 2018 02:45 PM|mgebhard|LINK
Read/Write is a property of the file system not the file and web app cannot affect the file system.
If this is a Word file then you can protect the file with Word.
If this is a text file then you are out of luck. Rather than downloading the file you'll need to provide the file contents in a web page.
Mar 02, 2018 02:48 PM|londhess|LINK
Mar 02, 2018 04:13 PM|mgebhard|LINK
I am generating Excel file using Microsoft interop components. Is their any mechanism while creating the excel we can make this read-only worksheet in c#.
Office Interop should work since
Excel also has the read-only feature (MS Office). You'll need to search through the Interop docs to find the API or ask this question on the MS Office support forum. This is an ASP.NET support forum.
However, I must warn you that Office Interop on a web server is not recommended or supported by Microsoft. The reason is MS Office must be installed on the server, which is a security risk, and Interop actually opens Excel to perform the operations. This
can cause concurrency issues.
I suggest that you create a PDF which is, for the most part, read only.