1, Obtain the data of the SPS Document Library
Spsite site = Spcontrol. getcontextsite (context );
// Retrieve the root site on the Virtual Server
Spweb = Site. allwebs [ " / " ];
// Obtain the shared documents object.
Spdocumentlibrary doclib = (Spdocumentlibrary) web. Lists [ " Shared documents " ];
// Obtain the data of the Document Library
Splistitemcollection items = Doclib. items;
Foreach (Splistitem item In Items)
... {
Response. Write (response code. htmlencode (item. XML ));
}
2,Modify the Active Directory logon Password
String Username = Spcontrol. getcontextweb (context). currentuser. loginname;
Username = Username. Remove ( 0 , Username. lastindexof ( ' \ ' ) + 1 );
Directoryentry user = New Directoryentry ( " Winnt ://./ " + Username );
Try
... {
User. Invoke ("Changepassword",New Object[]...{Oldpsw, newpsw});
}
Catch (Exception ex)
... {
Output. writeline ("Error");
} ;