New features of ASP under IIS6.0 (Iv.)

Source: Internet
Author: User
IIS The following example enables partitioning on the default Web site application (w3svc/1/root). Note that the AspAppServiceFlags property changes as soon as the AspEnableTracker property is set.

On Error Resume Next

Set providerobj = GetObject ("winmgmts://MyMachine/root/MicrosoftIISv2")

' Get a reference to an ASP application named ' Default Web site '

Set iiswebvirtualdirsettingobj = Providerobj.get ("iiswebvirtualdirsetting= ' W3svc/1/root '")

WScript.Echo "Before:aspusepartition =" & IIsWebVirtualDirSettingObj.AspUsePartition

WScript.Echo "AspPartitionID =" & Iiswebvirtualdirsettingobj.asppartitionid

WScript.Echo "AspAppServiceFlags =" & Iiswebvirtualdirsettingobj.aspappserviceflags

' Set up ASP applications to enable COM + partitioning

IIsWebVirtualDirSettingObj.AspUsePartition = 1

' Set the AspPartitionID property to the GUID configured in the Component Services Manager

' When you create a COM + partition

Iiswebvirtualdirsettingobj.asppartitionid = "{00000000-0000-0000-0000-000000000000}"

' Save values to the IIS configuration database

Iiswebvirtualdirsettingobj.put_ ()

' Get a reference again to refresh the AspAppServiceFlags property.

Set iiswebvirtualdirsettingobj = Nothing

Set iiswebvirtualdirsettingobj = Providerobj.get ("iiswebvirtualdirsetting= ' W3svc/1/root '")

WScript.Echo "After:aspusepartition =" & IIsWebVirtualDirSettingObj.AspUsePartition

WScript.Echo "AspPartitionID =" & Iiswebvirtualdirsettingobj.asppartitionid

WScript.Echo "AspAppServiceFlags =" & Iiswebvirtualdirsettingobj.aspappserviceflags

Tracking Program:

COM + Tracker allows an administrator or developer to debug an ASP application. For example, if a WEB application causes a problem on the server, you can enable COM + tracker to determine when an ASP page is loaded, when the COM component is loaded, and when the thread leaves the Web page. After you debug your application, you can disable the COM + tracker to return the application to normal execution speed.

To enable COM + tracker on the IIS side, set the AspEnableTracker flag for the AspAppServiceFlags metabase properties at the application level.

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.