Error while running an installed Windows Service on dedicated Server

随声附和 提交于 2020-01-06 12:44:23

问题


Error while running an installed Windows Service on dedicated Server

I installed my windows service on my virtual dedicated server using the exe file of my windows service.

When I try to run my windows service from a virtual dedicated server then I get following error.

 Service cannot be started. System.InvalidOperationException: Could not find default endpoint element that references contract 'MyService.MyServSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
  at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)
at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName)
at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)
at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()
at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)

What could be wrong?


回答1:


Did you supply an app.config for the service .exe?

It looks like it's either missing or incorrect from the exception message:

Could not find default endpoint element that references contract 'MyService.MyServSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.



来源:https://stackoverflow.com/questions/6201631/error-while-running-an-installed-windows-service-on-dedicated-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!