Authentifation failure. (remoting problem)

  • Thread starter Kristian Reukauff
  • Start date
K

Kristian Reukauff

Hi

I have a problem with the .Net-Securty-Functions.
I've got a client and a server.
When I try to register a channel at the server with this line:
ChannelServices.RegisterChannel(chan, false);
I get the following error - doesn't matter if I try it local from my machine
or from a remote machine.

(After the Errormessage is more text ;))

Authentifation failure.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.Remoting.RemotingException: Authentication failure --->
System.IO.IOException: Unable to read data from the transport connection:
The connection was closed.
at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult
lazyResult)
at
System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential
credential, String targetName, ProtectionLevel requiredProtectionLevel,
TokenImpersonationLevel allowedImpersonationLevel)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.CreateAuthenticatedStream(Stream
netStream, String machinePortAndSid)
--- End of inner exception stack trace ---

Server stack trace:
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.CreateAuthenticatedStream(Stream
netStream, String machinePortAndSid)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.CreateSocketHandler(Socket
socket, SocketCache socketCache, String machinePortAndSid)
at
System.Runtime.Remoting.Channels.SocketCache.CreateSocketHandler(Socket
socket, String machineAndPort)
at
System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint
ipEndPoint)
at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String
machinePortAndSid, Boolean openNew)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage
msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at classfield.IServer.connectionCheckLogin(IClient tempcO, String ip,
String id, String pwd)
at networkmodule.networkModule.login(String id, String pwd, String
serverIp) in D:\Dokumente und Einstellungen\Kriss1\Eigene Dateien\Visual
Studio Projects\#nGame\networkmodule\networkModule.cs:line 253
at ngame.login.button1_Click(Object sender, EventArgs e) in D:\Dokumente
und Einstellungen\Kriss1\Eigene Dateien\Visual Studio
Projects\#nGame\ngame\login.cs:line 31
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.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)




When I use this line
ChannelServices.RegisterChannel(chan, true);
I can connect from my machine to my machine - doesn't matter if i use
127.0.0.1 or a Hamachi/VPN IP.
All remote-machines getting this error:

A remote side security requirement was not fulfilled during authentication.
Try increase the ProtectionLevel and/or ImpersonationLevel.
-----------------------------------------------------
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Security.Authentication.AuthenticationException: A remote side
security requirement was not fulfilled during authentication. Try increasing
the ProtectionLevel and/or ImpersonationLevel. --->
System.ComponentModel.Win32Exception: The network logon failed
--- End of inner exception stack trace ---

Server stack trace:
at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult
lazyResult)
at
System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential
credential, String targetName, ProtectionLevel requiredProtectionLevel,
TokenImpersonationLevel allowedImpersonationLevel)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.CreateAuthenticatedStream(Stream
netStream, String machinePortAndSid)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.CreateSocketHandler(Socket
socket, SocketCache socketCache, String machinePortAndSid)
at
System.Runtime.Remoting.Channels.SocketCache.CreateSocketHandler(Socket
socket, String machineAndPort)
at
System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint
ipEndPoint)
at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String
machinePortAndSid, Boolean openNew)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage
msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at classfield.IServer.connectionCheckLogin(IClient tempcO, String ip,
String id, String pwd)
at networkmodule.networkModule.login(String id, String pwd, String
serverIp) in D:\Dokumente und Einstellungen\Kriss1\Eigene Dateien\Visual
Studio Projects\#nGame\networkmodule\networkModule.cs:line 253
at ngame.login.button1_Click(Object sender, EventArgs e) in D:\Dokumente
und Einstellungen\Kriss1\Eigene Dateien\Visual Studio
Projects\#nGame\ngame\login.cs:line 31
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.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)





Can anybody help me?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top