AppFabric 自动启动WCF - 服务器重新启动异常

发布于 2024-11-23 21:06:49 字数 1596 浏览 0 评论 0原文

我的服务器设置是 Windows Server R2、IIS 7.5、AppFabric

我已将 WCF 服务启用为自动启动。

当服务器在夜间重新启动时,服务会失败并在事件日志中显示以下错误。

    WebHost failed to process a request.
 Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/12036987
 Exception: System.ServiceModel.ServiceActivationException: The service '/Host/emailservice.svc' cannot be activated due to an exception during compilation.  The exception message is: An item with the same key has already been added.. ---> System.ArgumentException: An item with the same key has already been added.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.ServiceModel.Activation.HostedTransportConfigurationManager.EnsureInitialized()
   at System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetBaseAddresses(String virtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
   --- End of inner exception stack trace ---
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
 Process Name: w3wp
 Process ID: 2540

看起来 AppFabric 不处理线程,有人有类似的问题或解决方法吗?

My Server setup is Windows Server R2, IIS 7.5, AppFabric

I have my WCF services enabled to Auto-Start.

When the servers restarted over night, the services fail with following error in Event Log.

    WebHost failed to process a request.
 Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/12036987
 Exception: System.ServiceModel.ServiceActivationException: The service '/Host/emailservice.svc' cannot be activated due to an exception during compilation.  The exception message is: An item with the same key has already been added.. ---> System.ArgumentException: An item with the same key has already been added.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.ServiceModel.Activation.HostedTransportConfigurationManager.EnsureInitialized()
   at System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetBaseAddresses(String virtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
   --- End of inner exception stack trace ---
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
 Process Name: w3wp
 Process ID: 2540

It looks like AppFabric not handling threading, any one having similar issue or workaround?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文