By using the following method, I am getting the clients Desktop/Laptop systems name well, here my questions is ...
i) using this method can I get mobile device (android, iphone) name too?
ii) similar this can I get device Mac address?
My code:
Public Shared Function DetermineCompName(ByVal IP As String) As String
Dim myIP As IPAddress = IPAddress.Parse(IP)
Dim GetIPHost As IPHostEntry = Dns.GetHostEntry(myIP)
Dim compName As List(Of String) = GetIPHost.HostName.ToString().Split("."c).ToList()
Return compName.First()
End Function
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
I tried this is working and get computer name locally, but I am getting error in client side (remote System), anything need to change?
ref my code:
Public Shared Function DetermineCompName(ByVal IP As String) As String
Dim myIP As IPAddress = IPAddress.Parse(IP)
Dim GetIPHost As IPHostEntry = Dns.GetHostEntry(myIP)
Dim compName As List(Of String) = GetIPHost.HostName.ToString().Split("."c).ToList()
Return compName.First()
End Function
I tried this is working and get computer name locally, but I am getting error in client side (remote System), anything need to change?
For the second time! A web server cannot get the MAC address and computer name. If you want the web server to have this information then you must write a application installed on the client that sends the data to the web server. Keep mind, even if the
web server has this information it cannot be used for anything of importance. The web server typically cannot contact the client using this information. Usually there is nothing on the client listening unless your wrote an application.
If this is not a web application then you are in the wrong forum. Can you explain what problem you are trying to solve and how this information solve the problem?
Sorry, I am very beginner of this, yes I understand your point, im developing web an application, I'm trying to catch any one evedience from client machine who supplying or posting the data. This is my expectation.
Sorry, I am very beginner of this, yes I understand your point, im developing web an application, I'm trying to catch any one evedience from client machine who supplying or posting the data. This is my expectation.
There's no way to uniquely identify a device over HTTP. You can get the remote IP address but the IP address may not be unique or reliable. Typically the user is identified by login.
Thanks for your reply, we are trying to prevent, users accessing the applications through their own gadgets, anyway I try to find out other ways or VPN methods.
Member
359 Points
526 Posts
How I get mob. device name & mac addr. in asp. vb
Sep 12, 2020 09:08 PM|ayyappan.CNN|LINK
Hi,
please suggest me!
By using the following method, I am getting the clients Desktop/Laptop systems name well, here my questions is ...
i) using this method can I get mobile device (android, iphone) name too?
ii) similar this can I get device Mac address?
My code:
Thanks in advance
Dept of ICT.
Mark post(s) as "Answer" that helped you
All-Star
53081 Points
23655 Posts
Re: How I get mob. device name & mac addr. in asp. vb
Sep 13, 2020 11:43 AM|mgebhard|LINK
It's not possible to get the MAC address and Name from a web application.
Contributor
3730 Points
1431 Posts
Re: How I get mob. device name & mac addr. in asp. vb
Sep 14, 2020 02:26 AM|yij sun|LINK
Hi ayyappan.CNN,
You could check Request.Browser property for device/user agent.
More details,you could refer to below article:
https://forums.asp.net/t/1601335.aspx?How+to+get+the+Mobile+Device+Name+in+VB+NET
You won't be able to get the client's MAC address as that information isn't provided over the http protocol.
More details,you could refer to below article:
https://forums.asp.net/t/1911211.aspx?Get+Client+Mac+Address+in+Asp+Net+Web+Application
Best regards,
Yijing Sun
Member
359 Points
526 Posts
Re: How I get mob. device name & mac addr. in asp. vb
Sep 14, 2020 05:04 PM|ayyappan.CNN|LINK
I tried this is working and get computer name locally, but I am getting error in client side (remote System), anything need to change?
Please help me.
Dept of ICT.
Mark post(s) as "Answer" that helped you
All-Star
53081 Points
23655 Posts
Re: How I get mob. device name & mac addr. in asp. vb
Sep 14, 2020 05:22 PM|mgebhard|LINK
For the second time! A web server cannot get the MAC address and computer name. If you want the web server to have this information then you must write a application installed on the client that sends the data to the web server. Keep mind, even if the web server has this information it cannot be used for anything of importance. The web server typically cannot contact the client using this information. Usually there is nothing on the client listening unless your wrote an application.
If this is not a web application then you are in the wrong forum. Can you explain what problem you are trying to solve and how this information solve the problem?
Member
359 Points
526 Posts
Re: How I get mob. device name & mac addr. in asp. vb
Sep 15, 2020 03:36 AM|ayyappan.CNN|LINK
Hi,
Sorry, I am very beginner of this, yes I understand your point, im developing web an application, I'm trying to catch any one evedience from client machine who supplying or posting the data. This is my expectation.
Thanks.
Dept of ICT.
Mark post(s) as "Answer" that helped you
All-Star
53081 Points
23655 Posts
Re: How I get mob. device name & mac addr. in asp. vb
Sep 15, 2020 10:41 AM|mgebhard|LINK
There's no way to uniquely identify a device over HTTP. You can get the remote IP address but the IP address may not be unique or reliable. Typically the user is identified by login.
Member
359 Points
526 Posts
Re: How I get mob. device name & mac addr. in asp. vb
Sep 15, 2020 12:09 PM|ayyappan.CNN|LINK
Hi,
Thanks for your reply, we are trying to prevent, users accessing the applications through their own gadgets, anyway I try to find out other ways or VPN methods.
Thanks
Dept of ICT.
Mark post(s) as "Answer" that helped you