The ApplicationManifest class defines the application manifest for a SIP application.

An application manifest is required for all Microsoft Lync Server 2010 applications, and provides the SIP message processing rules needed to correctly handle only those SIP messages of interest to the application. An application uses the ApplicationManifest object to register the application with Lync Server 2010 through the ServerAgent object. Most applications will use only one manifest, but multiple manifests are supported.

The application manifest is represented as an XML document available to the application, either within the source or as a separate file. The document structure of the application manifest is as follows:

  Copy imageCopy Code
<?xml version="1.0" ?>
   --application attributes here--

		 --message filter script here--


The application attributes must precede the message filter script. The lc:appUri attribute is a unique string containing the name of the running application, and is used to identify the application manifest to the server. An HTTP-style URI that contains the domain and the application name is required because it guarantees uniqueness. This URI must be registered upon installation with WMI using the MSFT_SIPApplicationSetting (Updated) WMI class.

The message filter script must be written in the MSPL Scripting Reference (MSPL).

For more information about creating and implementing an application manifest, as well as a complete list of application attributes and MSPL instructions, see SIP Application Manifests.

The ApplicationManifest class is derived from the System.Object class.

Public Methods

The ApplicationManifest class has the following public methods.




Parses the application manifest specified with the ApplicationManifest.CreateFromFile or ApplicationManifest.CreateFromString method and compiles the content.


Static (Shared). Creates an instance of an ApplicationManifest object from a specified application manifest file.


Static (Shared). Creates an instance of an ApplicationManifest object from a specified string containing an application manifest.


Inherited from System.Object. Determines whether the specified System.Object is equal to the current System.Object.


Inherited from System.Object. Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.


Inherited from System.Object. Gets the System.Type of the current instance.


Indicates whether the compiled application should be displayed when Compile is called.


Inherited from System.Object. Returns a System.String that represents the current System.Object.

Public Properties

The ApplicationManifest class has the following public property.




Data type: StringAccess type: Read-only

Contains the application URI as defined in the application manifest.

Example Code

The following code sample demonstrates the dynamic creation and compilation of an application manifest.

  Copy imageCopy Code
ServerAgent mySA;
string manifest = @"<?xml version=""1.0""?><lc:applicationManifest appUri=""" +
appURI + @""" xmlns:lc="""">" +
"\n" + @"<lc:requestFilter methodNames=""ALL"" strictRoute=""true""/>" +
"\n" + @"<lc:responseFilter reasonCodes=""ALL"" />" +
"\n" + @"<lc:proxyByDefault action=""true"" />" +
"\n" + @"<lc:splScript><![CDATA[" +
"\n" + @"   if (sipRequest)  {  Dispatch (""OnRequest"");  return; }" +
"\n" + @"   if (sipResponse)  {  Dispatch (""OnResponse"");  return; }" +
"\n" + @" ]]></lc:splScript>" +
"\n" + @"</lc:applicationManifest>";

ApplicationManifest myAppManifest = ApplicationManifest.CreateFromString(manifest);
bool success = true;

Console.WriteLine("The application manifest was compiled successfully.");
catch(CompilerErrorException e)
Console.WriteLine("The application manifest could not be compiled successfully:" + e.Message);
success = false;

if (success)
// Create a new ServerAgent, taking the object instance (presuming it has the dispatch handlers
// OnRequest and OnResponse implemented on it) and the application manifest as parameters.
mySA = new ServerAgent(this, myAppManifest);


Redistributable: Microsoft Lync Server 2010.


Assembly: ServerAgent (in ServerAgent.dll)

See Also