Server Object Implementation

The Server object provides access to methods and properties on the server. Most of these methods and properties serve as utility functions. The following table shows the supported server methods.

Server method Windows CE implementation
ScriptTimeout Not supported.
CreateObject Not supported.
Execute Not supported.
GetLastError Not supported.
HTMLEncode Not supported.
MapPath Fully supported.
Transfer Not supported.
URLEncode Fully supported.

To create a COM object on Windows CE–based ASP, use the scripting language support for creating COM objects, instead of the Server.CreateObject method, as you would using IIS-based ASP.

In JScript, the following code would create the object of type class.name.

<% var newObject = new ActiveXObject("class.name") %>

To perform the same operation using VBScript, use the following code.

<%
    dim newObject
    set newObject = CreateObject("class.name")
%>

There is no explicit need to delete COM objects that are created on ASP pages. This is unlike needs associated with using JScript or VBScript. ASP automatically deletes all COM objects that are created on ASP pages. For more information on ASP and the caching of DLLs, see Initial Settings.

See Also

Initial Settings | Server Objects

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.