Object: | FileManager | |||||||||||||||
Syntax: | LogonUser ([in] DomainName, [in] Username, [in] Password, [in] LogonType) | |||||||||||||||
Description: | LogonUser is a very powerful method. While a given ASP page is executing, you can
use it to switch user contexts, so the rest of the page executes as the specified
user. To return to the previous user context, use the RevertToSelf method. LogonUser calls cannot be nested. Every LogonUser must have a RevertToSelf before issuing another LogonUser. LogonUser allows you to become a different user, perform some privileged file manipulations, and then return the previous security context of the execution thread. Every LogonUser should have a corresponding RevertToSelf. The password will be supplied in clear-text, so you must be particularly vigilant about either:
LogonType can be one of the following:
These constants can be found using the IIS 4 or later TypeLibrary feature, or by viewing the vbFileManagerInclude.asp file contained in the .\Samples\directory. You may get an error in the following situation: When an application is run out of process, the IWAM_<Machine Name> account is used for authentication. IWAM_<Machine Name> does not have the right to "Act as part of the operating system." To correct this, either:
|