0

There is COM+ server already running. I can see this in services.

Now, I want to install/configure a new version of this component. So, I stop the service. Copy new com+ dll and exe file to the location. Start the service and I get following error.

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.Runtime.Remoting.Channels.Http.HttpServerChannel.StartListening(Object data)
   at System.Runtime.Remoting.Channels.Http.HttpServerChannel.SetupChannel()
   at System.Runtime.Remoting.Channels.Http.HttpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider)
   at System.Runtime.Remoting.Channels.Http.HttpChannel..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)'.

I get the same error when I run it in Visual Studio from the console app that is set as service and consumes COM+ server.

Another point to note is that Console App failes on RemoteConfiguration.Configure statement. As a test, I made a separate console app to make a direct call to COM component using 'new' keyword , which works fine.

What am I missing here?

peacefulmember
  • 293
  • 2
  • 5
  • 14
  • Is COM+ your only option? Can you use a shared .dll or web service instead? – jrummell Sep 06 '12 at 14:38
  • @jrummell - I have to stick with COM+ as it is already running. I just need to install a new updated version of it. – peacefulmember Sep 06 '12 at 14:50
  • Not so sure it has much to do with COM+. The error is stating you've the IP/port pair used by the remoting channel already bound. Is this running more than once, or is the config bad (using port you had not inteded to)? – tcarvin Sep 06 '12 at 16:36
  • Has the AssemblyVersion of your com+ service dll increased with the new version of the service? You'll find that in the AssemblyInfo.cs file in your project. – GTG Sep 06 '12 at 17:37

1 Answers1

0

I think you need to import the component into COM Services using the options in Component Services in Control Panel. If you just copy the new objects over the old ones then the new component won't be registered.

Rikalous
  • 4,514
  • 1
  • 40
  • 52
  • Can you give an example on how to register it? I have Client application registered under Component Services and was in impression that only proxy needs to be registered in Component Services. – peacefulmember Sep 06 '12 at 17:08