Automate the creation of a virtual directory using ADSI, ASP, and a pair of magic tricks, Part II
Tom Moran and Jeff sandquist
February 22, 1999
We're back. The second part of this article, which is eagerly awaited, is now here. And I think you will spend the whole evening watching your cat clean yourself.
This month, Jeff sandquist and I completed our Dynamic Directory Service interface (Active directory Services interfaces,
Virtual directory
Automate the creation of a virtual directory using ADSI, ASP, and a pair of magic tricks, Part IITom Moran and Jeff sandquistFebruary 22, 1999
We're back. The second part of this article, which is eagerly awaited, is now here. And I think you will spend the whole evening watching your cat clean yourself.
This month, Jeff sandquist and I completed our Dynamic Directory Service interface (Active directory Services interfaces,
CopyCode The Code is as follows: '/* =================================================== ==========================================
'* Intro VBScript uses ADSI to batch add IP addresses that are blocked or allowed to access IIS
'* Filename VBScript-ADSI-IIS-Add-Deny-Grant-IP-Change-MetaBase.xml.vbs
'* ===================================================== ============================================= */
'Add
Very valuable code, the following code is the use of ADSI
Object database concept, as long as you understand
What I said in the previous article, the following code is just ADSI his experiment.
As long as you have the following ideas, no matter what the database to deal with, it is not known
The structure of the database is also not to be feared.
'---Define DSN names in array
Database_list=array ("dsn_1", "
Oscar was posted at 99-6-15 09:44:00 in Joy ASP:
Automate the creation of a virtual directory using ADSI, ASP, and a pair of magic tricks, Part II
Tom Moran and Jeff sandquist
February 22, 1999
We're back. The second part of this article, which is eagerly awaited, is now here. And I think you will spend the whole evening watching your cat clean yourself.
This month, Jeff sandquist and I completed our Dynamic Directory Service interface (Active directo
Last time I spoke about how to use ADSI to manage web servers. This time I discussed how ADSI manages NT.To use ADSI to manage IIS, OP4 is required.NTLM is required for nt adsi management.NTLM provides the following objects: Domain, Group, and User.You can add groups and users through the domain object.Warning:In the f
What I said last time is how to use ADSI to manage Web server this time to discuss how ADSI manages NT
Using ADSI to manage IIS requires OP4
For an NT to be ADSI managed, you need NTLM
NTLM provides the following objects: Domain, Group, and User.
You can add groups and users through domain objects.
Warning:
The followi
Child.name
Next Child
EndIf
With this enumeration operation, we can access all package container objects and directory objects in the directory subtree.
(3) Read the properties of the directory object.
The easiest way to read an object's properties is to pass directly through the object's Iads::get or Iads::getex interface member functions, such as:
Dim MyUser as IADs
Dim Mycommonname as String
Set myuser = GetObject ("Winnt://myserver/myname")
Mycommonname = Myuser.get ("Fullname")
Of course,
Use ASP settings to specify site CPU maximum usage
'=================================================
' Function Description: Set the maximum CPU usage for the specified site
' This function uses ADSI and requires Administrators group user rights
' Function name: Setcpulimitvar (Computer,sitenum,limitvar)
' Usage: Setcpulimitvar computer name, site number, maximum limit (100=1%,1000=10%)
' Example: Setcpulimitvar "LocalHost", "2", "2000"
'=====
Programming | control | data | Database very valuable code, the following code is compiled using ADSI's object database concept, so long as you understand what I said in the previous article, the following code is just ADSI his experiment as long as you have the following idea, no matter what database to deal with, Just don't know the structure of the database and don't be afraid.
'---Define DSN names in array
Database_list=array ("dsn_1", "dsn_2", "D
(obj. Schema)
Set sc = GetObject (CL. Parent)
Set PR = sc. GetObject ("Property", "Owner")
MsgBox "Attribute:" Pr. Name
MsgBox "Syntax:" Pr. Syntax
Set sy = GetObject (SC. AdsPath "/" PR. Syntax)
MsgBox "Syntax object:" Sy. Name "of Oleautodatatype:" Sy. Oleautodatatype
(6) Add or remove directory objects.
Using the IADsContainer interface method of the package container object (see table 4), we can easily add or delete directory objects, for example:
Dim Container as IADsContainer
Dim N
would be a heavy burden to not reconfigure 20 servers, but maybe it is not necessary. For those who interact with the web every day
People should remember this quote--change is timeless. So we only expect it to get better.
There are indeed two problems in previous versions of IIS. First, the lack of a clear, open Third-party management product interface and a customized
An automated programmable interface for general management tasks. Second, a mechanism for controlling directory services to en
Functions | control | Virtual Host | functions | Virtual host uses ASP to set the maximum usage of the site CPU
'=================================================
' Function Description: Set the maximum CPU usage for the specified site
' This function uses ADSI and requires Administrators group user rights
' Function name: Setcpulimitvar (Computer,sitenum,limitvar)
' Usage: Setcpulimitvar computer name, site number, maximum limit (100=1%,1000=10%)
' E
Use AUO (Active user Object) to maintain user information
If you don't understand some of these technical terms,
Please refer to the article I sent earlier about ADSI.
Now when the Web site programming, to save the user information is often used
Technology is:
1. Using the Session object to save user information is a common way to allow
You add a session variable to any location in your program, and it's not
Declared variables for type checking, its s
classdefinition = GetObject (Vroot.schema) '//Get class definition of virtual directoryAsmusthaves = Classdefinition.mandatorypropertiesAsmayhaves = Classdefinition.optionalpropertiesI=1%>On Error Resume Next
For each Thing in asmusthavesResponse.Write "Thing ""i = i + 1Next%>
I=1For each Thing in asmayhavesResponse.Write "Thing ""i = i + 1NextOn Error Goto 0
'//Create virtual directoryResponse.Write Svirdir ""Set VDir = vroot.create ("IIsWebVirtualDir", Svirdir)
'//Set the two properties of
iis| Create | control | Virtual Directory This is the site used to rush the stuff, the result is almost finished the police uncle to a website to record, friends do not do, I also shut down,
Turn it out and share it ~
It is said that control of IIS and other MS garbage (MS FTP, user management ...) You can use ADSI and WMI (Win2k3 is good),
Refer to the information of netizens, have copyright problem trouble email
The original is written according to
Copy Code code as follows:
Dim StrIP
StrIP = Request ("IP")
%>
Enter Ip:If strip= "List" then
Call Listdenyip ("2443")
Response.End
End If
If strip= "Query" then
Call Checkwebsitesetup
Response.End
End If
#
If stripCall Adddenyip ("2443", StrIP)
End If
Sub Checkwebsitesetup ()
Set iisobj=getobject ("Iis://localhost/w3svc")
For each website in IIsObj
If website. class= "IIsWebServer" Then
For each B in website. ServerBindings
Re
Transferred from: http://blog.csdn.net/iijse/article/details/6161143Hql Query methodThis is one of my most used and favorite, because it is flexible and intuitive to write, and not much worse than the syntax of the familiar SQL. Conditional query, paged query, connection query, nested
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.