|
|
#1 |
|
Lively Member
Join Date: May 06
Posts: 117
![]() |
MAC address of server returns "Access Denied"
Can anyone help me please, I currently have a vb.net app that has an SQL database running on a companies server. I am currently trying to get the MAC address of the server using the below code. This code works fine for a networked computer but not for the server (I guess because it has additional security, which would make sense). Can anyone advise me on a better way to get this info or how I can solve my original code.
Note: I don't want to use a stored procedure (if this is possible) as people are able to tamper, and this is used for licensing of my app. VB Code:
Thanks in advance Simon |
|
|
|
|
|
#2 |
|
Frenzied Member
Join Date: Sep 04
Location: Saturn
Posts: 2,036
![]() ![]() |
Re: MAC address of server returns "Access Denied"
The MAC address is stored in the registry Search key NetworkAddress.
Jorge
__________________
"The dark side clouds everything. Impossible to see the future is." |
|
|
|
|
|
#3 |
|
PowerPoster
Join Date: Jul 06
Location: Providence, RI - USA
Posts: 6,855
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: MAC address of server returns "Access Denied"
Hi, try this function then... You can pass in either the host name or ip address and it'll spit out the MAC address for that machine.
VB Code:
|
|
|
|
|
|
#4 |
|
Lively Member
Join Date: May 06
Posts: 117
![]() |
Re: MAC address of server returns "Access Denied"
I have tried your code but unfortunately it does not seem to work on the server but does work on my computer, maybe it is another security issue.
It throws an error 'Object reference not set to an instance of an object' Thanks Simon |
|
|
|
|
|
#5 | |
|
PowerPoster
Join Date: Jul 06
Location: Providence, RI - USA
Posts: 6,855
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: MAC address of server returns "Access Denied"
Quote:
So I really don't know why it doesn't work for you.... Can you verify this: open command prompt and type in "nbtstat -a serverName" or "nbtstat -A xxx.xxx.xxx.xxx" (where xxx.xxx.xxx.xxx is the IP address of the server) then press enter key. If the command runs successfully then the problem is from somewhere else, not from the code I showed you. Last edited by stanav; Jan 24th, 2007 at 09:44 AM. |
|
|
|
|
|
|
#6 |
|
Frenzied Member
Join Date: Sep 04
Location: Saturn
Posts: 2,036
![]() ![]() |
Re: MAC address of server returns "Access Denied"
It works fine on my computer. Can't you search the server's registry, it should be easy if you have a administrative account.
__________________
"The dark side clouds everything. Impossible to see the future is." |
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|