How get client (user) machine name (computer name) with jQuery or JavaScript or server-side codes. (scrutiny of possible ways)
As far as I remember, in order to get:
Request.ServerVariables["REMOTE_ADDR"]
Request.ServerVariables["REMOTE_HOST"]
Request.ServerVariables["REMOTE_USER"]
you have to enable Reverse DNS Lookup
for you IIS.
p.s.
atm I'm not able to test it myself, so I'm not quite sure if this will solve ur problem
How to get Client computer name from Asp.net web application (internet application)
You can get Computer names using codes if they are in a network(intranet) which works fine as you suggested.
At the same time when the system is accessed via internet there is no computer name rather Domain name.
I want to get the machine name of the client the request is being made
from. With ASP I can get the IP address. But I don’t know how to get
the name of the machine. Is there something I could do from the client
side?
No, the web browser client cannot determine the name of the machine.
Clients and servers should not trust each other. In the absence of
authentication evidence, clients must assume that all servers are run
by evil hackers and servers must assume that all clients are run by
evil hackers. Once you accept that fundamental design principle then
it becomes much easier to reason about client-server interactions.
Think like an evil person!
More reference on the topic (Retrieving the system name) , you can refer :
Stack Overflow posts :
- Get Client ip address and system name
- How get client (user) machine name (computer name) with jQuery or JavaScript or server-side codes.
Hope that will put more light on the issue.
Is there a way to retrieve the Computer Name of a Xenapp client?
It appears this information is stored in the environment variable called CLIENTNAME, and it is only in the Process Environment. I used the following code:
System.Environment.GetEnvironmentVariable("CLIENTNAME", EnvironmentVariableTarget.Process);
Can we get IP address and/or machine of client accessing a particular website?
try this site
http://www.geekpedia.com/tutorial45_How-to-get-IP-address-of-client.html
here they have given a way to do it may be it will help
Related Topics
Check If Combobox Value Is Empty
Reference External Dll in .Net Core Project
Moq - Non-Overridable Members May Not Be Used in Setup/Verification Expressions
Asp.Net Core, Change Default Redirect for Unauthorized
How to Get Column Names of Table At Runtime in C#
Why Am I Getting Error Cs0246: the Type or Namespace Name Could Not Be Found
Kill Child Process When Parent Process Is Killed
Using Formflow Dialog in Bot Framework
Setting Connection String With Username and Password in Asp.Core MVC
How to Get the Xml Soap Request of an Wcf Web Service Request
Automatically Update Values in Database from Datagridview
Replace Single Backslash With Double Backslash
First Call to Web API Is Very Slow C#
Add Header and Footer for Pdf Using Itextsharp