Kein solcher Host ist bekanntC#

Ein Treffpunkt für C#-Programmierer
Anonymous
 Kein solcher Host ist bekannt

Post by Anonymous »

Ich versuche mit dieser Bibliothek für Telnet -Verbindungen zu arbeiten. Ich habe die Funktion korrekt aufgerufen und es wird den folgenden Code ausgeführt, aber der folgende Fehler angibt: < /p>

System.Net.Sockets.SocketException was unhandled
HResult=-2147467259
Message=No such host is known
Source=System
ErrorCode=11001
NativeErrorCode=11001
StackTrace:
at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
at MinimalisticTelnet.TelnetConnection..ctor(String Hostname, Int32 Port) in c:\users\kylec\documents\visual studio 2010\Projects\Mail Server Capture\Mail Server Capture\TelnetInterface.cs:line 36
at Mail_Server_Capture.Form1.btn_MailGet_Click(Object sender, EventArgs e) in c:\users\kylec\documents\visual studio 2010\Projects\Mail Server Capture\Mail Server Capture\Form1.cs:line 55
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Mail_Server_Capture.Program.Main() in c:\users\kylec\documents\visual studio 2010\Projects\Mail Server Capture\Mail Server Capture\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
< /code>

Code: < /p>

public TelnetConnection(string Hostname, int Port)
{
tcpSocket = new TcpClient(Hostname, Port);

}
< /code>

Ich habe hier gesucht und nach diesem Problem gesucht und es scheint ziemlich häufig zu sein. Einige Leute sagen, der Gastgeber sei wirklich unerreichbar (dies ist nicht der Fall), es ist ein Microsoft .NET -Problem oder nur eine Ausnahme, die ignoriert werden kann. Ich kann das Programm nicht dazu bringen, es zu bestehen, wenn es etwas ist, das ignoriert werden kann. Ich kann auch anscheinend keine Lösungen finden, um es zu beheben. Ich bin ziemlich verloren in diesem Fall, jede Hilfe würde geschätzt werden.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post