0

COM+ 服务器已经在运行。我可以在服务中看到这一点。

现在,我想安装/配置这个组件的新版本。所以,我停止服务。将新的 com+ dll 和 exe 文件复制到该位置。启动服务,我收到以下错误。

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)'.

当我从设置为服务并使用 COM+ 服务器的控制台应用程序在 Visual Studio 中运行它时,我得到了同样的错误。

需要注意的另一点是控制台应用程序在 RemoteConfiguration.Configure 语句上失败。作为测试,我制作了一个单独的控制台应用程序,使用 'new' 关键字直接调用 COM 组件,效果很好。

我在这里想念什么?

4

1 回答 1

0

我认为您需要使用控制面板中组件服务中的选项将组件导入 COM 服务。如果您只是将新对象复制到旧对象上,则不会注册新组件。

于 2012-09-06T15:53:28.387 回答