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. Licensing

Licensing

Scheduled Pinned Locked Moved C#
csharphostinghelptutorialquestion
6 Posts 3 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.
  • P Offline
    P Offline
    Patrick Lassalle
    wrote on last edited by
    #1

    I am facing some difficulties with the licensing scheme in .NET. I have created a solution with 2 projects: - a licensed windows form .NET control (written in C#) - a small application hosting the control (written in VB) Currently, I just try a basic licensing using the .NET LicFileLicenseProvider. I am quite sure to have written the code as indicated in the .NET doc. However it does not work. The license exception is raised except is the license file is placed in the application exe directory. It seems that no license key has been embed in the .exe. Does anybody has faced such a problem? How to solve it? (I use .NET v1)

    R T 2 Replies Last reply
    0
    • P Patrick Lassalle

      I am facing some difficulties with the licensing scheme in .NET. I have created a solution with 2 projects: - a licensed windows form .NET control (written in C#) - a small application hosting the control (written in VB) Currently, I just try a basic licensing using the .NET LicFileLicenseProvider. I am quite sure to have written the code as indicated in the .NET doc. However it does not work. The license exception is raised except is the license file is placed in the application exe directory. It seems that no license key has been embed in the .exe. Does anybody has faced such a problem? How to solve it? (I use .NET v1)

      R Offline
      R Offline
      Roger Alsing 0
      wrote on last edited by
      #2

      yes i had the same problem first. but i think it will be solved if you simply compile your control first (in a separate solution) then open your host app . add the control to the toolbox , and place it on a form in the host app. (your license file should be located in the same dir as the .dll) now vs.net should generate a "licenses.licx" in your host app.. (you will only see this if you show all files in the project explorer) if you open the "licenses.licx" it should contain something like: "MyControlProject.MyControl is a licensed component" and the "licenses.licx" should be an "embeded resource". if all this apply , your licensing should work... //Roger

      P 1 Reply Last reply
      0
      • R Roger Alsing 0

        yes i had the same problem first. but i think it will be solved if you simply compile your control first (in a separate solution) then open your host app . add the control to the toolbox , and place it on a form in the host app. (your license file should be located in the same dir as the .dll) now vs.net should generate a "licenses.licx" in your host app.. (you will only see this if you show all files in the project explorer) if you open the "licenses.licx" it should contain something like: "MyControlProject.MyControl is a licensed component" and the "licenses.licx" should be an "embeded resource". if all this apply , your licensing should work... //Roger

        P Offline
        P Offline
        Patrick Lassalle
        wrote on last edited by
        #3

        Thanks very much. I have followed your advices and have finally been able to solve my problem!

        1 Reply Last reply
        0
        • P Patrick Lassalle

          I am facing some difficulties with the licensing scheme in .NET. I have created a solution with 2 projects: - a licensed windows form .NET control (written in C#) - a small application hosting the control (written in VB) Currently, I just try a basic licensing using the .NET LicFileLicenseProvider. I am quite sure to have written the code as indicated in the .NET doc. However it does not work. The license exception is raised except is the license file is placed in the application exe directory. It seems that no license key has been embed in the .exe. Does anybody has faced such a problem? How to solve it? (I use .NET v1)

          T Offline
          T Offline
          T Jenniges
          wrote on last edited by
          #4

          Something else to think about: Since you are licensing your controls I assume that you probably want to keep people from recreating your "source" code via the .NET disassemblers/decompilers that are already out there. For a scary example of one see: http://remotesoft.com/salamander/index.html (You can test their disassembler on your own code on this site) This tool will recreate your original source code minus some comments. I have a question: Has anybody found a way (e.g., a build flag) to make decompiling of .NET assemblies more difficult besides paying a $1K for an MSIL obfuscator? TonyJ

          P 1 Reply Last reply
          0
          • T T Jenniges

            Something else to think about: Since you are licensing your controls I assume that you probably want to keep people from recreating your "source" code via the .NET disassemblers/decompilers that are already out there. For a scary example of one see: http://remotesoft.com/salamander/index.html (You can test their disassembler on your own code on this site) This tool will recreate your original source code minus some comments. I have a question: Has anybody found a way (e.g., a build flag) to make decompiling of .NET assemblies more difficult besides paying a $1K for an MSIL obfuscator? TonyJ

            P Offline
            P Offline
            Patrick Lassalle
            wrote on last edited by
            #5

            I have purchased an obfuscator (from Preemptive Solutions).

            T 1 Reply Last reply
            0
            • P Patrick Lassalle

              I have purchased an obfuscator (from Preemptive Solutions).

              T Offline
              T Offline
              T Jenniges
              wrote on last edited by
              #6

              I'm hoping not to pay twice for something: #1, Pay MS so I can COMPILE programs/libraries #2, Pay someother company so $$ so someone else can't DECOMPILE the code I COMPILED Thanks anyhow. I'll take a look at the company if I can't find a free alternative.

              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