【问题标题】:Turning on Start Mode to Always Running in MVC Application without access to Application Pools将启动模式打开为始终在 MVC 应用程序中运行而不访问应用程序池
【发布时间】:2015-11-28 11:49:33
【问题描述】:

我将我的网站托管在我无法访问应用程序池的服务器上。我的网站只有很少的用户,所以它关闭了,当有人试图进入时——这需要很多时间。所以我想将启动模式更改为 AlwaysRunning 并将 Preload Enabled 设置为 True 并禁用超时/定期回收,但我在 ISS 管理器中没有应用程序池(服务器提供商让我使用远程 iis)。

我能做什么?这是我的网络配置:

<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=301880
  -->
<configuration>
  <appSettings>
    <add key="webpages:Version" value="3.0.0.0"/>
    <add key="webpages:Enabled" value="false"/>
    <add key="ClientValidationEnabled" value="true"/>
    <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5"/>
    <httpRuntime targetFramework="4.5"/>
  </system.web>

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken=""/>
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Optimization" publicKeyToken=""/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken=""/>
        <bindingRedirect oldVersion="1.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken=""/>
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken=""/>
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken=""/>
        <bindingRedirect oldVersion="1.0.0.0-5.2.2.0" newVersion="5.2.2.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

【问题讨论】:

    标签: asp.net-mvc iis application-pool


    【解决方案1】:

    如果您无权访问您的网站,例如无法更改 ApplicationHost.config 并且您的托管服务提供商未在控制面板中公开该设置,那么您将无能为力。
    但是,您可以做的一件事是使用“网站 ping 服务”,它可以每 5 分钟左右 ping 您的网站,具体取决于您的托管服务提供商回收池的频率(空闲超时)以防止它关闭(当然这可能不会让您的托管服务提供商满意,他们甚至可能会阻止流量)。

    只需输入“网站 ping 服务”,您就会发现许多免费服务。如果您使用的是 Azure,您可以使用网站可用性服务,它可以做到这一点,还可以为您提供很好的指标,并从世界上的多个地方对其进行 ping。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-07
      • 1970-01-01
      • 2016-10-04
      相关资源
      最近更新 更多