简体   繁体   English

ASP.NET MVC。 当没有活跃用户使用时,应用程序响应时间过长

[英]ASP.NET MVC. Application takes too long to respond when there are no active users using

When the application is being used all the time, the responses seem to be much faster.当应用程序一直在使用时,响应似乎要快得多。

For example, if you have active users in the application, making requests to the server, when I access the application, i am instantly taken to the login screen, but if no one has used it for a certain period of time, it seems that the server is hibernating for have no activity and takes too long to answer.例如,如果您在应用程序中有活跃用户,向服务器发出请求,当我访问该应用程序时,我会立即被带到登录屏幕,但如果一段时间内没有人使用它,似乎服务器正在休眠,因为没有活动并且需要很长时间才能回答。

Is this kind of problem normal, because no one is using it or do I have to make a configuration on the server or in the code to solve this?这种问题是否正常,因为没有人使用它还是我必须在服务器或代码中进行配置才能解决这个问题?

am the .net fremawork 4.6.1是 .net fremawork 4.6.1

Sounds like IIS is putting recycling the application to free resources, you can change the timeout and recycling policy like so:听起来 IIS 正在回收应用程序以释放资源,您可以像这样更改超时和回收策略:

In order to cancel IIS Timeout and recycling, follow these steps:为了取消 IIS 超时和回收,请按照下列步骤操作:

Cancel Idle Time-out:取消空闲超时:

  1. Go into the IIS Manager进入 IIS 管理器
  2. Click on Application Pools (on the left)单击应用程序池(左侧)
  3. Right click on the application右键单击应用程序
  4. Select "Set Application Pool Defaults..."选择“设置应用程序池默认值...”
  5. Change the value of "Idle Time-out (minutes)" from 20 to 0将“空闲超时(分钟)”的值从 20 更改为 0
  6. Click "ok"点击“确定”

Cancel IIS Recycling :取消 IIS 回收:

  1. Go into the IIS Manager进入 IIS 管理器
  2. Click on Application Pools (on the left)单击应用程序池(左侧)
  3. Right click on the application右键单击应用程序
  4. Select "Recycling..."选择“回收...”
  5. Uncheck "Regular time intervals (in minutes)"取消选中“常规时间间隔(以分钟为单位)”
  6. Click next点击下一步
  7. Click finish点击完成

Then just Restart the IIS然后只需重新启动IIS

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

相关问题 ASP.NET C#MVC。 运行已编译的应用程序 - Asp.Net C# mvc. Running compiled application 我想使用Asp.net C#mvc中的Auth0 API来获取ADFS服务器用户。 有可能这样做吗? - I want to fetch ADFS server users using Auth0 API in Asp.net C# mvc. Is it possible to do so? 在IIS Express 8上启动ASP.NET MVC 5项目需要很长时间才能启动 - Start an ASP.NET MVC 5 projects on IIS Express 8 takes too long to start 尝试将用户添加到ASP.NET MVC中的角色。 更改未保存 - Trying to add users to roles in ASP.NET MVC. Changes not being saved 在ASP.Net MVC中使用SaveChanges时如何获取自动生成的ID。 我目前的方法效率低下 - How to get the AutoGenerated ID when using SaveChanges in ASP.Net MVC. My current method seems inefficient ASP.NET MVC。 数据驱动的子域名? - ASP.NET MVC. Data driven subdomains? ASP.NET MVC中的全局错误处理。可能? - Global error handling in ASP.NET MVC. Possible? ASP.NET MVC。 如何在部分中插入SelectList? - ASP.NET MVC. How insert a SelectList inside an Partial? ASP.NET MVC。 PagedList通过多个参数过滤 - ASP.NET MVC. PagedList filtering by multiple params ASP.NET MVC。 Autofac和多个连接字符串 - ASP.NET MVC. Autofac and multiple connection strings
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM