locked
No connection could be made because the target machine actively refused it

    Question

  •  

    I am getting the "No connection could be made because the target machine actively refused it" exception while connecting one server with 2 clients. In server system, Server and client is running. In the other 2 client machines only reporting applications are running. When ever I do a data entry in the server machine, the other 2 client machines Data Cache will be updated. During this updation, I got this exception. So please any one find any resolution, just share with me.

    I am including the log messages here.

     

    regards,

    Arockia Raj. A

     

    Exception 1:

    BroadCast - No connection could be made because the target machine actively refused it

    Server stack trace:
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
       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 Twenty20.Server.Core.IClient.Update(String eventDetails)
       at Twenty20.Server.EventManager.BroadCast(String eventDetails)

     

    Exception 2:

    Remoting configuration failed with the exception 'System.Runtime.Remoting.RemotingException: The remoting application name, 'Twenty20Server', had already been set.
       at System.Runtime.Remoting.RemotingConfigHandler.set_ApplicationName(String value)
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)'.
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfigHandler.DoConfiguration(String filename, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfiguration.Configure(String filename, Boolean ensureSecurity)
       at Twenty20.Server.Program.Main() in D:\Projects\Twenty20\Program Files\Server\Twenty20.Server\Twenty20.Server\Program.cs:line 96
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

     

    Exception 3:

    Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
       at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Bind(EndPoint localEP)
       at System.Net.Sockets.TcpListener.Start(Int32 backlog)
       at System.Net.Sockets.TcpListener.Start()
       at System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
       at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)
       at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
       at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Runtime.Remoting.RemotingConfigHandler.CreateChannelFromConfigEntry(ChannelEntry entry)
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureChannels(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)'.
       at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfigHandler.DoConfiguration(String filename, Boolean ensureSecurity)
       at System.Runtime.Remoting.RemotingConfiguration.Configure(String filename, Boolean ensureSecurity)
       at Twenty20.Server.Program.Main() 
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

    Thursday, April 03, 2008 4:06 AM

All replies

  •  

    Hi

     

    Is it possible that you have a firewall enabled (Windows XP's or a
    third-party firewall) that could be blocking remote requests on port 80
    (assuming that is the port you use)?

     

    So better shut down all the firewall specially on the server ...then try it again.

     

     

    IF its is some webservice or web application please check in IIS all the settings.

     


    all you need to do is authenticate to the
    webserver before your site will be able to access the web service. I
    believe it would involve providing the correct headers telling the server to
    use NTLM authentication. Since your website is using impersonation, the
    context for NTLM should exist in order for it to work properly

    Thursday, April 03, 2008 4:57 AM
  • It sounds like you're opening a second connection when one is already open. Are you checking connection state in your app?

     

    Adam

    Thursday, April 03, 2008 5:02 AM
  • Hi,

     

    Thanks for your reply.

    It is a Windows application.

    I will check the firewall settings and share the details with you.

     

     

     

     

    Thursday, April 03, 2008 8:22 AM
  • Hi,

     

    I checked Firewall settings, but it is still on OFF mode only. So I think there is no possiblity for firewall blocking.

    Please let me know is there any other possiblity?

     

     

    Thanks.

     

    Thursday, April 03, 2008 8:51 AM