TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jose Saiz
1.1k
260
103.1k
Help getting the remote computer name
Feb 28 2019 5:05 PM
Hi guys, I am in big time need of solve the problem I am currently having trying to get the remote client computer name, I have tried the following
1st option
Request.UserHostName.Trim() works good within the Visual Studio IDE but it is deployed to Windows 2016 IIS8 hosting I get the Public IP instead.
2nd Option
I also tried the following which also works within the visual Studio IDE but after deployed
I get an error message "no host found"
string[] computer_name = System.Net.Dns.GetHostEntry(Request.ServerVariables["REMOTE_ADDR"]).HostName.Split(new Char[] { '.' });
String ecname = System.Environment.MachineName;
return computer_name[0].ToString();
3rd Option
I also tried the following which also works within the visual Studio IDE but after deployed
I get the server name instead
System.Net.Dns.GetHostEntry(Dns.GetHostName()).HostName.ToString()
Any Idea How to get the remote client computer name with ASP.NET C# Framework 4.0
without using ActiveX
I will really appriciate the right and working answer.
TIA
Reply
Answers (
2
)
parseFloat problems in Internet Explorer
Regarding Angular 5 and ASP .net MVC 5