locked
How can you generate a unique ID based off of hardware in .NETCore c#? RRS feed

  • Question

  • Hello,
    I'm hoping that you can help me on an issue i am not able to fix. In .NETCore for my metro application, there is, to my knowledge, a way to retrieve a unique computer ID based off of hardware. I am creating a program that authenticates the computer for server-sided Database usage, and i want to create a session based off of the computer id. I have not been able to create or find code that will generate the same ID on a computer, but not on another one in .NETCore. Hope someone can tell me how to :)

    Thanks in advanced,
    ~TreehouseTechnologies
    Sunday, March 4, 2012 4:33 PM

Answers

  • Hi Treehouse,

    There is no built in unique computer ID for Metro style apps. You would need to come up with your own hash, possibly leveraging Windows.Networking.Connectivity.NetworkInformation.GetInternetConnectionProfile().NetworkAdapter.NetworkAdapterId .

    --Rob

    Tuesday, March 6, 2012 2:07 AM
    Moderator