Flicks FAQ: Setvirtualdomain

Back to the top of the FAQ


AuthentiX ISP Only

The SetVirtualDomain method specifies which virtual domain subsequent operations apply to, based on the supplied IP address and script name. The parameters are easily obtained from server variables as shown in the example below, but only if the ASP page is within the virtual domain. If the page is outside the virtual domain, pass the required parameters to the page, or use the alternative SetVirtualDomainDirect.
Note: the CreateObject call is different for AuthentiX and AuthentiX ISP. Type regsvr32 authxisp.ocx at the command line to register on your system.

If you don't set this, and use other functions anyway, you will get errors like
"AXISP (7726725) error, directory not set."
in the application event log.


SetVirtualDomain(IPAddress, scriptName)


IP Address of the virtual domain.
Script name, the portion of the URL that follows the domain name.

Return Values

Returns 0 for success.


The following example sets the domain and queries that domains AuthentiX database to see if a user is a member of the domain's group 'GroupX'.

Set auth = Server.CreateObject("AUTHXISP.AuthXOCXCtrl.1") 

auth.SetVirtualDomain(Request.ServerVariables("LOCAL_ADDR"), Request.ServerVariables("SCRIPT_NAME"))

if 0 = auth.GroupHasUser("GroupX", "user1") Then
Group has that user.
<% Else %>
No user with that name in that group.
<% End If %>


Applies To

AuthentiX OCX Component


Back to the top of the FAQ