I have started getting an InvalidCredentialException error
Hi,
I am running a client/server application using remoting. I start the server okay and have multiple clients connected and using the system for a number of hours when suddenly I get lots System.Security.Authentication.InvalidCredentialException exceptions thrown. The exceptions keep occuring until I stop and re-start the server application.
Here is the full exception trace:-
[26/09/2007 11:32:10.820 ERROR]: mscorlib,RealProxy.HandleReturnMessage sysspear on LONS0637:
Failed to post DataChanged message to subscribed view with credentials failure.
[System.Security.Authentication.InvalidCredentialException]: The server has rejected the client credentials. at mscorlib,RealProxy.HandleReturnMessage.
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 Nomura.EFT.Infrastructure.ViewManager.IView.DataChanged(Subject subject)
at Nomura.EFT.Infrastructure.ViewManager.ModelBase.PostSubscriberDataChanged(ModelSubscriber subscriber, Subject subject)
Inner Exceptions:
[System.ComponentModel.Win32Exception]: The logon attempt failed at Unknown Source,Unknown method.
Here is my remoting configuration:-
<
system.runtime.remoting><
customErrorsmode="off" /><
applicationname="Spear"><
lifetimeleaseManagerPollTime="10S"leaseTime="5M"renewOnCallTime="2M"sponsorshipTimeout="2M" /><
channels><
channelref="tcp"port="8001"secure="true"impersonate="true"tokenimpersonationlevel="Impersonation"><
serverProviders><
providerref="wsdl" /><
formatterref="binary"typeFilterLevel="Full" /></< FONT>serverProviders>
<
clientProviders><
formatterref="binary" /></< FONT>clientProviders>
</< FONT>channel>
<
channeltype="Ch.Elca.Iiop.IiopChannel,IiopChannel"port="9000" /></< FONT>channels>
.....
</< FONT>application></< FONT>system.runtime.remoting>
Here is my code calling remoting configuration:-
// Initialise remoting ... if (System.Runtime.Remoting.RemotingConfiguration.ApplicationName ==null) { System.Runtime.Remoting.RemotingConfiguration.Configure(System.AppDomain.CurrentDomain.SetupInformation.ConfigurationFile,false); }
Any help is much appreciated,
Jeremy

