Regular recovery of ASP. NET

Source: Internet
Author: User

We installed ASP. NET on the IIS 5 server to provide. NET applications through the Web. This application runs well, but the aspnet_wp.exe process consumes too much memory and is periodically recycled by ASP. NET. We like the recycle function, but we hope that ASP. NET can be recycled regularly instead of waiting until the memory is low. In IIS 5, we usually use the IIS 5 process recycle tool to perform this operation. How can we make ASP. NET perform the recycle operation at the specified time, just like the IIS 5 process recycle tool.

IIS 5 process recycling tool (English) is a very useful tool with it, you can configure IIS 5 to restart Based on the http gets quantity, time, memory consumption, and other parameters. This tool was developed before ASP. NET was released, so it cannot identify the ASP. NET application file running on the IIS 5 server. However, ASP. NET will also restart; however, you can also use the built-in ASP. NET configuration elements, separate ASP. NET. this can be achieved through ASP. NET web. in the config file. By default, web. config is located in the % systemroot % \ Microsoft. Net \ Framework \ v \ CONFIG directory. It is an XML file. You can use Notepad and other text editors to open and edit it. Open this file and search for "processmodel". This will go to the process mode configuration section, which contains the following sections with comments:

Note: you can set a unit time, minute, and second value for the preceding "timeout" variable. This value specifies the survival time of the aspnet_wp.exe process. When ASP. NET starts aspnet_wp.exe, it calls a page that requires ASP. NET at the first startup), the timer starts timing. When the time when the asnet_wp.exe process is "alive" is equal to the timeout value, it will be recycled.

Although this is different from setting a date and time to recycle ASP. NET processes, it can implement regular collection of ASP. NET and ensure the normal operation of applications. In addition, you can control other aspects of this recycle operation, such as disabling it when the worker process is no longer in use, so as to perform the recycle operation during off-peak hours ).
Web applications developed by ASP.net 1.1 are released through IIS7 after they are upgraded to 2.0 or 3.5.

The authentication method in the program adopts Form authentication. The code in the Web. Config file is as follows:

 
 
  1. <authentication mode="Forms"> 
  2. <forms loginUrl="Pages\SystemPage\Login\logon.aspx" name=
    ".ADUAUTH" protection="All"> 
  3. </forms> 
  4. </authentication> 


Problem Encountered]

After logon authentication, the program always displays the logon page logon. aspx detects logon Through program tracking. aspx. the Request cannot be changed because SetAuthCookie () and RedirectFromLoginPage () in cs are invalid after execution. isAuthenticated value, always false;

Solution]

Run IIS7-> the Web application-> Authentication-> Form Authentication-> Edit

  1. DataList and Repeater controls of ASP. NET
  2. Analysis of IIS ing in ASP. NET
  3. Overview ASP. NET status types
  4. Introduction to ASP. NET and Web servers
  5. EnableViewState attribute of ASP. NET

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.