Syntax
Use the Server object with the following syntax:Server. propertymethod
To create an instance of an ActiveX server component, use the CreateObject method followed by the PROGID of the component. Use the ScriptTimeout property to set or determine the amount of time a server-side script runs before it times out and returns an error to the user .
The first step in using an ActiveX server component is to create a reference to that component. Once you have created the reference, you can call the methods of the component or set and retrieve properties of the component.
You can also use the CreateObject method to create a reference to a Java class.
ActiveX controls run on the user's computer, while ActiveX server components reside and run on the Web server.
Example
This example creates a reference to the Browser Capabilities component.<% Set bc = Server.CreateObject("MSWC.BrowserType") %>
ActiveX server components enable you to package and reuse common functions, such as accessing a database and writing information to text files on a Web server.
You can access the components installed on a Web server by using an .asp file with the CreateObject method of the Server object.
By default, a server-side script has 90 seconds to finish running. This does not include server-side script running an ActiveX server component. A server-side script will not time out while a server component is processing.
If the script takes longer to run than the default timeout set in the Windows registry, use the ScriptTimeOut property to change the timeout for that Active Server Page. This enables a large script to complete without timing out.
Example
This example uses the ScriptTimeout property of the Server object to increase the amount of time a script has to run before timing out:<% Server.ScriptTimeout = 180 'SECONDS %>