This document is archived and information here might be outdated.  Recommended version.


IServerObjectManager.CreateServerContext Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Server > ESRI.ArcGIS.Server > Interfaces > IS > IServerObjectManager Interface > IServerObjectManager.CreateServerContext Method
ArcGIS Developer Help

IServerObjectManager.CreateServerContext Method

Gets a reference to a server context. The server context can be based on a specified server object configuration, or can be an empty server context if no server object configuration is specified.

[Visual Basic .NET]
Public Function CreateServerContext ( _
    ByVal configName As String, _
    ByVal TypeName As String _
) As IServerContext
[C#]
public IServerContext CreateServerContext (
    string configName,
    string TypeName
);
[C++]
HRESULT CreateServerContext(
  BSTR configName,
  BSTR TypeName
);
[C++]
Parameters
configName [in]

configName is a parameter of type BSTR TypeName [in]
TypeName is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The CreateServerContext method on IServerObjectManager is used to get a reference to a context on the server. A context is a process managed by the server within which a server object runs. You can use CreateServerContext to create a context based on a server object configuration, or you can create empty contexts soley for the purpose of creating ArcObjects on the fly within the server.

When using CreateServerContext to create a context based on a server object configuration, if the server object configuration is pooled, you may get a reference to a context that is already created and running in the server. When you have completed using that context, it is important to released it explicitly by calling the ReleaseContext method on IServerContext to return it to the pool. When using CreateServerContext to create a context based on a non-pooled server object configuration, or when creating an empty context, a new context is created on the server. You still need to call ReleaseContext when you are finished using it, and the context is destroyed on the server.

 

As of 9.3 some of the possible values for typeName are:

See Also

IServerObjectManager Interface