10 TIPs - To Become a Good Developer/Programmer
Why Join
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
arun sahani
0
379
0
Show Ping Status in list
Apr 24 2019 2:05 AM
Hi,
Using Asp.net mvc5, I have table with fields like "id", and "server_IP" populated with n-numbers of server ip. And wants to display the status of each IP " success" or "timeout" depending upon ping.
I have used following;
Ping myPing = new Ping();
PingReply reply = myPing.Send("8.8.8.8", 1000);
if (reply != null)
{
ViewData["ip_stat"] = reply.Status;
}
I could not use this in my viewlist so that status of each servers can be shown as
Server_ip
status
8.8.8.8
Success
192.168.10.10
timeout
192.168.100.1
sucess
REGARDS
ARUN SAHANI
Reply
Answers (
1
)
Diffrence between ASP.Net web api Vs .Net core web api ?
Smart Card Reading (ROCKETEK) in ASP.NET