简体   繁体   English

WCF服务-是什么导致其随机关闭?

[英]WCF service - what could cause it to randomly shut-down?

In IIS, I have an ASP.net web application that makes many behind-the-scenes calls to an IIS-hosted WCF service. 在IIS中,我有一个ASP.net Web应用程序,该应用程序对IIS托管的WCF服务进行了许多后台调用。

I never had any issues during development. 在开发过程中我从未遇到任何问题。 However, since deploying to a few test servers at work, our tester was reporting that some of the calls were seemingly randomly failing. 但是,由于已部署到工作中的一些测试服务器,我们的测试人员报告说某些调用似乎是随机失败的。 I verified that indeed, some of those behind the scenes webapp->service calls were failing with a "(417) Expectation Failed". 我确认确实确实有一些在幕后的webapp-> service调用失败,并显示“(417)Expectation Failed”。 Hitting the back-button and attempting the action again always worked. 按下后退按钮并再次尝试操作始终有效。

A common solution I kept seeing online was https://stackoverflow.com/a/7358457/1669011 我一直在网上看到的常见解决方案是https://stackoverflow.com/a/7358457/1669011

After adding that to my web config, the error continued to happen, but instead of returning a 417, would end up returning the results of my web.config's applicationInitialization remapManagedRequestsTo page. 将其添加到我的Web配置后,该错误继续发生,但是没有返回417,而是最终返回了我的web.config的applicationInitialization remapManagedRequestsTo页面的结果。

I feel like the web.config fix I mentioned above has just allowed my web application to accept the full body of the response rather than failing when it realised it wasn't the wcf response it was expecting. 我感觉上面提到的web.config修复程序只允许我的Web应用程序接受响应的整个主体,而不是在意识到它不是期望的wcf响应时失败。

So if random services in WCF are returning the results of remapped requests that occur during Application Initialization, does that indicate that my WCF services in IIS are constantly totally shutting down? 因此,如果WCF中的随机服务返回在应用程序初始化期间发生的重新映射的请求的结果,是否表明我的IIS中的WCF服务一直在完全关闭?

What might cause my WCF service to randomly be in a state of "application initialization"? 是什么导致我的WCF服务随机处于“应用程序初始化”状态? I'm hoping this is just a server issue and nothing to do with my application, as this has come out of nowhere and is risking an upcoming deploy. 我希望这只是服务器问题,与我的应用程序无关,因为这无处不在,并有可能即将部署。

Thanks for any assistance 感谢您的协助

My guess would be time (or very serious exceptions). 我的猜测是时间(或非常严重的例外)。

Specifically, if the server hosting the WCF service is not being hit often enough, it will shut down the application. 具体来说,如果托管WCF服务的服务器受到攻击的频率不够高,它将关闭该应用程序。 Follow the instructions here to ensure the WCF site is not being unloaded: How to keep a WCF site online? 请按照此处的说明操作,以确保未卸载WCF站点: 如何使WCF站点保持联机状态? .

If it's exceptions, you have not provided enough information to diagnose the issue. 如果是例外,则您没有提供足够的信息来诊断问题。

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

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