HI,
I am getting the following exception is my log file, can any one help me in indentifying the issue?? Is it network issue? or any suggestion , how to proceed
My C# code is trying to ping different severs for information. But getting the following exception.
Server Pingable ==> XYZ
Exception in getting printer details Object reference not set to an instance of an object.
Exception in connectToServer System.Net.NetworkInformation.PingException: An exception occurred during a Ping request. ---> System.Net.Sockets.SocketException: No such host is known
at System.Net.Dns.GetAddrInfo(String name)
at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options)
--- End of inner exception stack trace ---
at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options)
at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress)
at Connect.connectToServer(String ServerName)
Exception in connectToServer System.Net.NetworkInformation.PingException: An exception occurred during a Ping request. ---> System.Net.Sockets.SocketException: No such host is known
at System.Net.Dns.GetAddrInfo(String name)
at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options)
--- End of inner exception stack trace ---
at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options)
at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress)
at Connect.connectToServer(String ServerName)
Exception in connectToServer System.Net.NetworkInformation.PingException: An except

Vimal KandasamyRank #2,151 · 661 reputationPosted Mar 2, 2009, 12:11 AM EST
Hi,
from ur details it seems the host name given to connect is wrong...make sure hostname you have passed to connect is right.
ravi birlangi9 reputationPosted Mar 2, 2009, 12:39 AM EST
ravi birlangi9 reputationPosted Mar 2, 2009, 12:40 AM EST
Vimal KandasamyRank #2,151 · 661 reputationPosted Mar 2, 2009, 12:44 AM EST
ravi birlangi9 reputationPosted Mar 2, 2009, 12:47 AM EST
Vimal KandasamyRank #2,151 · 661 reputationPosted Mar 2, 2009, 12:51 AM EST
ravi birlangi9 reputationPosted Mar 2, 2009, 1:07 AM EST