We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Password protection with ActionResult

Thread ID:

Created:

Updated:

Platform:

Replies:

131829 Jul 29,2017 08:32 AM UTC Jul 31,2017 09:45 AM UTC ASP.NET MVC 1
loading
Tags: XlsIO
CLAUDIO RICCARDI
Asked On July 29, 2017 08:32 AM UTC

Hello,

I would like to protect xls document with a password to prevent modification.

This is the code:

...
                workbook.SetWriteProtectionPassword(db.Settings.FirstOrDefault(c => c.SettingCode.Equals("XLS_PASSWORD_PROTECTION")).SettingVal);
                // Set the workbook as read-only.
                workbook.ReadOnlyRecommended = true;

     workbook.Version = ExcelVersion.Excel2013;
                        return excelEngine.SaveAsActionResult(workbook, work.WorkCode + ".xlsx", HttpContext.ApplicationInstance.Response, ExcelDownloadType.PromptDialog, ExcelHttpContentType.Excel2013);

The xls document is generated correctly, but when I open it (it is downloaded from browser) I can modify it without password protection.

How can I solve the problem?

Thanks. Claudio
               

Abirami Varadharajan [Syncfusion]
Replied On July 31, 2017 09:45 AM UTC

Hi Clauido,  
  
Thank you for contacting Syncfusion support.  
  
We are able to reproduce the issue. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.   
    
    
Please let me know if you have any concerns.   
  
Regards,  
Abirami.  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;