How to force the application pool to recycle in classic ASP (without using the IIS management console)?

I maintain an old classic ASP site for a friend hosted on a cheap shared host. They receive errors that will be resolved by utilizing the application pool.

However, the hosting control panel does not have any parameters for utilization of the application pool, and the hosting company itself does not respond to support requests.

Is there a way to get IIS to reuse the application pool from ASP itself? Can I change something in global.asa or something that will cause recycling? I have FTP access, and it is something like this.

UPDATE:
SOLVING THE PROBLEM @Schotime answer was right. Its code was in asp.net, I thought I posted the equivalent VBscript code that I found on aspfaq.com

<% 
Sub Touch(FolderPath, FileName, NewDate) 

    Set app = CreateObject("Shell.Application") 
    Set folder = app.NameSpace(FolderPath) 
    Set file = folder.ParseName(FileName) 

    file.ModifyDate = NewDate 

    set file = nothing 
    set folder = nothing 
    set app = nothing 
End Sub 

Call Touch(Server.MapPath("/"), "somefile.htm", "2005-09-01") 
Call Touch("C:\", "somefile.txt", "2012-01-01") 
%>
+3
source share
2 answers

If you change global.asa (for example, add a space), this will cause a restart. I am doing this through code from ASP.NET at the moment.

File.SetLastWriteTime(HttpContext.Current.Server.MapPath("~/global.asa"), DateTime.Now);
+4
source

no. ASP does not have access to the system level.

0
source

Source: https://habr.com/ru/post/1762948/


All Articles