SetOwner (UploadedFile Object)

Dundas

SetOwner (UploadedFile Object)

Call this method to set an owner to a file which has been saved to disk.

Syntax

UploadedFileObject.SetOwner(Account As String)

The SetOwner method syntax has the following part(s):

Part

Description

Account

The name of a valid Windows account. You can optionally precede the account name with the domain name and a backslash.

Remarks

An exception is thrown if the operation fails. Trap for success/failure by examining VBScript's Err object immediately after calling this method (the Number property of the Err object will be a non-zero value if it failed). MAKE SURE that you have enabled inline error trapping by using an On Error Resume Next statement at the beginning of the ASP page.

Note: Permission issues should be considered when using this method since an exception will be thrown if the user does not have the right to set the owner. Use the ImpersonateUser method to temporarily assume another Windows account which has the permission to set the file's owner. Once this is done call the ImpersonationTerminate method to resume using the default account.

See Also: ImpersonateUser | ImpersonationTerminate