Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to impose expiry date to various documents using C#

How to impose expiry date to various documents using C#

Scheduled Pinned Locked Moved C#
tutorialcsharp
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sachinkalse
    wrote on last edited by
    #1

    Dear All, Please guide me about imposing Expiry date to MS Office files (.doc, .docx, .xls, .xlsx, .ppt, .pptx, InfoPath) using C#, such that if the file has expiry date today, it should not open tomorrow. I know, we can do it if the IRM client is installed on client machine, but to avoid burden on the user we are told to do it through code. Regards Sachin

    D 1 Reply Last reply
    0
    • S sachinkalse

      Dear All, Please guide me about imposing Expiry date to MS Office files (.doc, .docx, .xls, .xlsx, .ppt, .pptx, InfoPath) using C#, such that if the file has expiry date today, it should not open tomorrow. I know, we can do it if the IRM client is installed on client machine, but to avoid burden on the user we are told to do it through code. Regards Sachin

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      There's no way to implement that kind of functionality. The filesystem would have to support it and, of course, it doesn't. You'd have to write your own file system extension (not in C#) to do this.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      S 1 Reply Last reply
      0
      • D Dave Kreskowiak

        There's no way to implement that kind of functionality. The filesystem would have to support it and, of course, it doesn't. You'd have to write your own file system extension (not in C#) to do this.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        S Offline
        S Offline
        sachinkalse
        wrote on last edited by
        #3

        Thanks for your reply. But I think its possible, as its already done by one vendor of our client, since its their IP, we do not have access to the source code. That DLL imposes all IRM rights that includes expiry date too. Regards Sachin

        D 1 Reply Last reply
        0
        • S sachinkalse

          Thanks for your reply. But I think its possible, as its already done by one vendor of our client, since its their IP, we do not have access to the source code. That DLL imposes all IRM rights that includes expiry date too. Regards Sachin

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          One of two things can do this. Either the application supports it, or the file system supports it. For the file system, you'd have to write an extension to the file system. For an application, you'd have to write some kind of Add-In for that application that replaces the app's load/save functionality. You can't just "throw in" an expiration date into the document properties and expect that to work on every instance of the application. For instance, throwing an expiration date into a Word document doesn't do anything unless that copy of Word has this extension installed. BUT!! What's to stop the user from opening the document on a copy of Word that DOESN'T have the extension installed?? NOTHING!! The document must be encrypted somehow to get around this kind of functionality limitation. You need to stop other copies of Word from opening up the document. As for how to replace the load/save functionality, I have no idea.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          S 1 Reply Last reply
          0
          • D Dave Kreskowiak

            One of two things can do this. Either the application supports it, or the file system supports it. For the file system, you'd have to write an extension to the file system. For an application, you'd have to write some kind of Add-In for that application that replaces the app's load/save functionality. You can't just "throw in" an expiration date into the document properties and expect that to work on every instance of the application. For instance, throwing an expiration date into a Word document doesn't do anything unless that copy of Word has this extension installed. BUT!! What's to stop the user from opening the document on a copy of Word that DOESN'T have the extension installed?? NOTHING!! The document must be encrypted somehow to get around this kind of functionality limitation. You need to stop other copies of Word from opening up the document. As for how to replace the load/save functionality, I have no idea.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            S Offline
            S Offline
            sachinkalse
            wrote on last edited by
            #5

            Thanks for the reply Dave, Well, I got some clue from MOSS ECM Starter Kit, where they have given some information about custom IRM protector. If I get anything concrete out of it, will definitely share. If any one has already done some work on it, please do share. Regards Sachin

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups