I have the requirement to get get the MAC address of the network interface in my Metro UI app. As far as I can tell, this is simply not supported in the .NET 4.5 for Metro application API. Am I wrong?
相关问题
- Inheritance impossible in Windows Runtime Componen
- IPAddress.[Try]Parse parses 192.168 to 192.0.0.168
- What would prevent code running in a Docker contai
- How to run tcp and udp on a single port at same ti
- Docker-Compose: Can't Connect to Mongo
相关文章
- Working with hmacsha256 in windows store app
- RMI Threads prevent JVM from exiting after main()
- Show flyout using BottomAppBar
- fsc.exe is very slow because it tries to access cr
- New Windows Application - What language?
- Get English exception message instead of local lan
- How many times will TCP retransmit
- How to remove an element from an IGrouping
You are restricted from accessing low-level networking information from a Metro Style application, therefore this is not possible with the stock SDK. This is by design.
You can't retrieve the MAC Address per say, but you do can retrieve hardware specific information to identify a machine.
Here's a complete msdn article discussing the subject: Guidance on using the App Specific Hardware ID (ASHWID) to implement per-device app logic (Windows)
Be careful to use just the information you need and not the complete id, as it might change based on information that are useless to you (such as the Dock Station bytes for instance).
Here's a code sample of a computed device id based on a few bytes (CPU id, size of memory, serial number of the disk device and bios):