简体   繁体   English

配置COM +服务器

[英]Configure COM+ server

There is COM+ server already running. 已经有COM +服务器正在运行。 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. 将新的com + dll和exe文件复制到该位置。 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. 当我从设置为服务并使用COM +服务器的控制台应用程序在Visual Studio中运行该错误时,会遇到相同的错误。

Another point to note is that Console App failes on RemoteConfiguration.Configure statement. 要注意的另一点是,控制台应用程序在RemoteConfiguration.Configure语句上失败。 As a test, I made a separate console app to make a direct call to COM component using 'new' keyword , which works fine. 作为测试,我制作了一个单独的控制台应用程序,使用'new'关键字直接调用COM组件,效果很好。

What am I missing here? 我在这里想念什么?

I think you need to import the component into COM Services using the options in Component Services in Control Panel. 我认为您需要使用“控制面板”中“组件服务”中的选项将组件导入COM Services。 If you just copy the new objects over the old ones then the new component won't be registered. 如果仅将新对象复制到旧对象上,则不会注册新组件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM