private void EditDocument(int attachment_id, HttpContext context) { var mail_box_manager = new MailBoxManager(ConfigurationManager.ConnectionStrings["mail"], 0); var file = mail_box_manager.GetMessageAttachment(attachment_id, TenantId, Username); var temp_file_url = file.GerPreSignedUrl(); var editor_url = CommonLinkUtility.GetFileWebEditorExternalUrl(temp_file_url, file.fileName); editor_url = new UriBuilder(CommonLinkUtility.GetFullAbsolutePath(editor_url)).ToString(); context.Response.Redirect(editor_url, false); }