I found this code (source) which if I understand it right would define IIS's Web Limits:

Set adminManager = WScript.CreateObject("Microsoft.ApplicationHost.WritableAdminManager")
adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST"

Set webLimitsSection = adminManager.GetAdminSection("system.applicationHost/webLimits", "MACHINE/WEBROOT/APPHOST")
webLimitsSection.Properties.Item("connectionTimeout").Value = "00:01:00"
webLimitsSection.Properties.Item("dynamicIdleThreshold").Value = 150
webLimitsSection.Properties.Item("headerWaitTimeout").Value = "00:00:30"
webLimitsSection.Properties.Item("minBytesPerSecond").Value = 500


Somehow I was not able to find where to specify Web Limits settings within the IIS Manager; so I was thinking of adding it within all my pages as an include.

The problem I am having it is triggering an error.

Warning: File /include.asp Line 11 Variable is undefined: 'WScript'. .

If I use Server.CreateObject instead I get:

Warning: File /include.asp Line 15 Variable is undefined: 'adminManager'. .

How can I get to code to run? (And is my approach OK?) I am not sure if these settings should be at all declared with every page call -- probably not!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.