简体   繁体   English

IIS托管的WCF服务的自动初始化

[英]Automatic initialization of IIS-hosted WCF service

I have an ASP.NET web-site and a WCF service which is called from ASP. 我有一个ASP.NET网站和一个从ASP调用的WCF服务。 The problem is, that during the first client request the site loads aufully slow, cause some time-consuming static objects are being created inside the WCF service. 问题在于,在第一个客户端请求期间,站点加载速度非常缓慢,导致在WCF服务内部创建了一些耗时的静态对象。 Is it possible to call any service method (by doing this the wcf object will be created), when the site gets loaded in IIS? 当站点加载到IIS中时,是否可以调用任何服务方法(通过此方法将创建wcf对象)? (I know there is a solution for this problem in ASP 4 and IIS 7.5, but i'd like to know what's about IIS6-7). (我知道在ASP 4和IIS 7.5中有解决此问题的方法,但是我想知道IIS6-7是什么)。 It is something like "user emulation") Maybe i can add some event handlers in global.asax? 就像“用户仿真”一样)也许我可以在global.asax中添加一些事件处理程序? Any help is appreciated. 任何帮助表示赞赏。

A very simple solution is to use wget within a scheduled task in Windows to simply issue a HTTP GET to your service. 一个非常简单的解决方案是在Windows的计划任务中使用wget来向您的服务简单地发出HTTP GET。 This will keep your application 'warm' and ticking over. 这将使您的应用程序保持“温暖”状态。

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

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