首页 » ASP代码 » ADSI操作IIS函数之设置应用程序池

ADSI操作IIS函数之设置应用程序池

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Dim w3svc,WebServer
'如果要设置单站的调用方法,参数1表示站点号
Call setAppPool (1)
'如果要设置所有,那么调用时用这段 ————————————
Set w3svc = GetObject("IIS://localhost/W3SVC")
For Each WebServer In w3svc
    If WebServer.Class = "IIsWebServer" Then
        Call setAppPool (WebServer.Name)
    end if
Next
'————————————————————————————
WScript.Echo "完成"
Sub setAppPool(siteid)  '设置IIS站点所在池的主要函数
    Set ServerRoot = GetObject("IIS://localhost/W3SVC/" & siteid & "/ROOT")
    ServerRoot.Put "AppPoolId", "DefaultAppPool"   '后面参数是池的名字
   ServerRoot.SetInfo
End Sub

接下来说怎么设置池的各项参数,先看看MetaBase.xml文件的结构
AppPoolAutoStart="TRUE"
AppPoolIdentityType="2"
CPUAction="0"
CPULimit="80000"
CPUResetInterval="5"
MaxProcesses="1"
PeriodicRestartMemory="812000"
PeriodicRestartPrivateMemory="593216"
PeriodicRestartTime="60"
>
怎样创建实例
接着设置他的属性
保存池的信息

, , , ,

转发到新浪微博 转发到新浪微博

目前这篇文章有4条评论(Rss)

  1. fajne strony | #1
    05/16/2012 at 13:30

    Thanks for your posting. I also think that laptop computers have grown to be more and more popular these days, and now will often be the only form of computer utilized in a household. Simply because at the same time potentially they are becoming more and more cost-effective, their working power is growing to the point where they may be as potent as desktop from just a few years back.

  2. Lose Weight | #2
    05/16/2012 at 14:17

    I am taking the Internet seriously now. I am retired and can dive into it. It seems like there are millions of blogs on the Internet today and the more I read the more I want to comment on them. I think I really appreciate the basics of what you have here in this blog. I am the proud owner of my own website and blog and i get ideas from blogs such as yours. Thank-you. There was a place to include an email and address, so I have done that. I hope you approve that I did this. It seems to be customary so I went ahead with it. TheVeryBest2You 13 12

  3. social | #3
    05/16/2012 at 17:55

    pDU6eX Im obliged for the article post. Really Great.

  4. service | #4
    05/16/2012 at 17:56

    q6IhTY Major thankies for the article.Much thanks again. Really Great.

我要评论