简体   繁体   English

mvc 4 + iis7.5应用程序停止

[英]mvc 4 + iis7.5 application stop

It's the first time that I write here so I hope to be very clear ! 这是我第一次在这里写书,所以我希望我能说得很清楚! I've a deployed mvc application on iis 7.5. 我在iis 7.5上部署了mvc应用程序。 In the application_start it starts to do some operation like download files on a fixed interval. 在application_start中,它开始执行某些操作,例如以固定间隔下载文件。 I've access to windows server 2008 by remote desktop on a virtual machine. 我可以通过虚拟机上的远程桌面访问Windows Server 2008。 The problem is that when I logout from this virtual machine, the application seems to stop and it is not downloading anymore anything 'till I don't start once another time the application. 问题是,当我从该虚拟机注销时,该应用程序似乎已停止,并且不再下载任何内容,直到我再次启动该应用程序为止。

Is it normal or do I've some kind of problem in my configuration ? 是正常现象还是我的配置出现问题?

I want that the application start just one time and cycle that kind of operations without stops.. 我希望应用程序仅启动一次,然后循环进行此类操作而不会停止。

On default application pool settings, this is normal (assuming you have low traffic to your site). 在默认的应用程序池设置中,这是正常现象(假设您的网站访问量较低)。 The app pool will shutdown after a set inactivity period and take your downloader offline with it. 在设定的闲置时间过后,应用程序池将关闭,并使下载程序脱机。 I believe the default is 20 minutes of inactivity. 我相信默认值为20分钟的不活动时间。

Here's some info on configuring the timeout. 以下是有关配置超时的一些信息。 http://technet.microsoft.com/en-us/library/cc771956(v=ws.10).aspx http://technet.microsoft.com/zh-CN/library/cc771956(v=ws.10).aspx

And here's some info about configuring IIS to auto start and always run (to somewhat emulate a windows service environment) http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx 以下是有关将IIS配置为自动启动并始终运行(以某种程度上模拟Windows服务环境)的一些信息http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net- Applications-vs-2010-and-net-4-0-series.aspx

Here are some of the risks and workarounds associated with running long running processes under asp.net http://haacked.com/archive/2011/10/16/the-dangers-of-implementing-recurring-background-tasks-in-asp-net.aspx 以下是与在asp.net下运行长时间运行的进程相关的一些风险和解决方法, 网址为http://haacked.com/archive/2011/10/16/the-dangers-of-implementing-recurring-background-tasks-in- asp-net.aspx

To my mind it isn't good idea to implement downloading in application_start (Check more there about lifetime in asp.net). 在我看来,它不是实现的Application_Start下载好主意(查看更多关于在asp.net寿命)。 You need to implement some kind of service for this purpose. 为此,您需要实施某种服务。 Could you specify your target for detailed answer? 您能指定详细答案的目标吗?

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

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