1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can ASP.NET get hardware information ?

Discussion in 'C#' started by Mr.AD, Jan 26, 2011.

  1. #1
    Hi,

    I have an ASP.NET application for sale. I want to manage license via hardware information like OS, CPUID,... I tried to search with Google but can not find exactly result.
    SEMrush
    Tell me if you know anything about that.
     
    Mr.AD, Jan 26, 2011 IP
    SEMrush
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,681
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
  3. Mr.AD

    Mr.AD Member

    Messages:
    89
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    41
    #3
    I think that informations can be changed by users and can not use them to generate unique hardware id.
     
    Mr.AD, Jan 26, 2011 IP
  4. flexorbits

    flexorbits Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Build a Win32 DLL that will do the job for you. The licensing of your web application product will require to access a method from the Win32DLL to start the Application (I would request NOT to validate the license at every login. Application start is the best).

    Why Application Start?
    When you start the website as an application (restart the website from IIS or start for the first time) the application start or similar events will get fired. If I remember correctly, when the first code behind page from your website is accessed the On-Application_start is fired. Validate the license, by issuing a request to the Win32DLL to validate the system configuration and license file (could be even a webservice from your website) and then make them proceed.

    Let me know if you require further methods on solving this approach. I hope this spark will lead you in the right direction. But if required, ask questions, I would be happy to help.
     
    flexorbits, Jan 30, 2011 IP
  5. longcall911

    longcall911 Peon

    Messages:
    1,672
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It is not very difficult at all if you are developing the app in Visual Studio. I do it with one of my apps by getting the MAC address of the network card. If the product key code that they enter matches the assigned at the point of sale (stored in mySQL database) then the database field is updated with a status of 'ok' and the machine registry is updated showing that the product has been activated.

    If the user wants to move his license, he must deactivate on one machine, then activate on another.
     
    longcall911, Feb 1, 2011 IP
  6. Mr.AD

    Mr.AD Member

    Messages:
    89
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    41
    #6
    Hi,

    Have you got any example code to get MAC address in a ASP.NET application ?

    Thanks !
     
    Mr.AD, Feb 7, 2011 IP
  7. miguelf

    miguelf Member

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    48
    #7
    You can also use WMI (Windows Management Instrumentation), this will give you a lot of information about the hardware and software but I would recommend that you take a different approach. With shared or VPN hosting the application could be moved to different hardware.
     
    miguelf, Apr 7, 2011 IP
  8. unknownpray

    unknownpray Active Member

    Messages:
    3,832
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    70
    #8
    To get hardware information, you need to create an object of ManagementObjectSearcher class.
     
    unknownpray, Jun 25, 2011 IP