Slow startup for the first time record IIS Performance Optimization

Source: Internet
Author: User

  

ASP. net website needs to be pre-compiled during release. this not only solves the problem of slow speed for the first time, but also compiles cshtml content. in this way, the code of our view is invisible to others. open.

Check "pre-compilation during release" during release, and click Settings to unselect "allow update of pre-compilation site ". in this way, the compiled website view is compiled. compiled file. A precompiledapp is added to the root directory. config file.

After being deployed on the server, the problem persists.

Then google Baidu will continue to see another ending dislike is to optimize IIS. this is also the reason for the above description of the deployment environment. because iis7.5 and iis8 have a big difference about performance. if it is deployed on iis8. the following is the setting method:

Iis8 settings
Application pool-Advanced Settings-Startup Mode: alwaysrunning
Application pool-Advanced Settings-Process Model-idle Timeout: 1740 (minutes)
Application-Advanced Settings-General-preload enabled: True

This will solve the problem.

 

However, these options are not available on iis7.5. You need to install a module: Application initialization module for IIS 7.5.

The download and installation process is omitted. Record the configuration method.

Open the applicationhost. config file on the server. This file is under the IIS installation directory config.

Add the following content (but it does not seem to work)

<globalModules>  <add name="ApplicationInitializationModule"       image="%windir%\System32\inetsrv\warmup.dll" /></globalModules>

Then set the website application and corresponding application pool

<system.applicationHost>  <applicationPools>    <add name="West Wind West Wind Web Connection"          autoStart="true"          startMode="AlwaysRunning"          managedRuntimeVersion="v4.0"          managedPipelineMode="Integrated">      <processModel identityType="LocalSystem"                    setProfileEnvironment="true" />    </add>  </applicationPools>   <sites>    <site name="Default Web Site" id="1">            <application path="/MPress.Workflow.WebQueueMessageManager"                    applicationPool="West Wind West Wind Web Connection"                    preloadEnabled="true">        <virtualDirectory path="/"        physicalPath="C:\Clients\…" />      </application>           </site>  </sites></system.applicationHost>

The key lies in the autostart = "true" startmode = "alwaysrunning" set in the application pool, which means automatic and startup modes.

Preloadenabled = "true"

 

After the settings are complete, the website can be enabled in seconds, basically solving the problem of slow opening for the first time. of course, there is still a problem of slow loading of EF for the first time, so I still don't know how to solve it. it seems that there is no way to solve this problem.

Slow startup for the first time record IIS Performance Optimization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.