server name?
C#
2
Posts
2
Posters
0
Views
1
Watching
-
What? Can you please rephrase your question a little more clearly? If you want to get the remote computer name in an ASP.NET web application (i.e., the requesting machine), use
Request.ServerVariables["REMOTE_HOST"]
. If you want to get the name of the computer on which your code is currently running, useEnvironment.MachineName
. If you want to enumerate the machines on your local network, you can use theSystem.DirectoryServices
to enumerate domain machines or P/Invoke the Network Management APIs which is discussed in several articles here on CodeProject. Try the following search: http://www.codeproject.com/info/search.asp?cats=3&cats=5&searchkw=NetServerEnum[^].Microsoft MVP, Visual C# My Articles