This project is read-only.

Prerequisites

  • The HTML Presence Controls were built in Visual Studio 2010 using C#.
  • The Controls and Samples project target the 4.0 framework.
  • The Service project targets the 3.5 framework.
  • You must provision a UCMA 3.0 trusted application in your Microsoft Lync Server 2010 environment and configure the Service project to use it.
  • The code is currently compiled for build 4.0.7457 (Release Candidate) of Lync Server 2010 and UCMA 3.0.

Provision a UCMA 3.0 Trusted Application and Application Endpoint

The rest of the instructions assume that you already have a Lync development environment with a trusted application pool created and configured. Here are some more detailed instructions on how to install UCMA 3.0 and create a trusted application pool.

Create a UCMA 3.0 Trusted Application

From the Lync Server Management Shell, run the following PowerShell script to create a trusted application for the HTML Presence Controls Service:

New-CSTrustedApplication 
  -ApplicationId <ApplicationId> 
  -TrustedApplicationPoolFqdn <TrustedApplicationPoolFqdn> 
  -Port <Port>

where:
  • ApplicationId is a unique name for the UCMA application, e.g. PresenceSubscriptionService.
  • TrustedApplicationPoolFqdn is the name of your Lync trusted application pool, e.g. cs-se.fabrikam.com.
  • Port is the port on which Lync listens for this application on.

Create an Application Endpoint

From the Lync Server Management Shell, run the following PowerShell script to create an application endpoint for the trusted application created in the previous step:

New-CSTrustedApplicationEndpoint 
  -ApplicationId <ApplicationId> 
  -TrustedApplicationPoolFqdn  <TrustedApplicationPoolFqdn> 
  -SipAddress <SipAddress> -DisplayName <DisplayName>

where:
  • ApplicationId is the same value from the previous step - this is how the endpoint is associated with the trusted application.
  • TrustedApplicationPoolFqdn is the name of your Lync trusted application pool, e.g. cs-se.fabrikam.com.
  • SipAddress is the SIP address of the trusted application endpoint, e.g. sip:presencesubscriptionservice@fabrikam.com.

Deploy to IIS

Modify Configuration Settings

WCF Service Url

Open the HTML Presence Controls Visual Studio 2010 solution, open HTMLPresenceControls.Samples\Web.config, and locate the HTMLPresenceControlsConfigurationGroup configuration section.

By default, the value of PresenceService\Url is set to http://localhost/HTMLPresenceControls.Service/GetPresence?sipUri= and the value of PresenceService\RefreshInternal is set to 3 seconds.

UCMA Application Settings

Open HTMLPresenceControls.Service\Web.config and browse to the appSettings section. Modify the values of ApplicationId, ApplicationName, and TrustedContactUri to correspond to the trusted application and endpoint you created. Also modify the values of LyncServer and LyncServerPort to correspond to your environment.

The base address of the service is set to http://localhost/HTMLPresenceControls.Service/ by default. You can modify this later after you deploy the service to IIS.

Create Application Pools

Create two application pools in IIS:
  • HTMLPresenceControls.Samples
    • .NET Framework v4.0.30319
  • HTMLPresenceControls.Service
    • .NET Framework v2.0.50727
    • In Advanced Settings, set Disable Overlapped Recycling to True
    • Set the application pool identity to a domain account that the service will run under - the service won't work if the application pool identity is set to the default value of ApplicationPoolIdentity.

Create an IIS website and applications

Create an IIS website called HTML Presence Controls and configure it to use the HTMLPresenceControls.Samples application pool.

Create a directory called HTMLPresenceControls.Samples in the web application, then convert it to an application. Ensure that the application is set to also use the HTMLPresenceControls.Samples application pool.

Create a directory called HTMLPresenceControls.Service in the web application, then convert it to an application. Configure the application to use the HTMLPresenceControls.Service application pool.

Deploy Service to IIS

From Visual Studio 2010, right-click the HTMLPresenceControls.Service project and select Publish to publish the service to the specified directory within the web application.

Deploy Samples website to IIS

From Visual Studio 2010, right-click the HTMLPresenceControls.Samples project and select Publish to publish the samples website to the specified directory within the web application.

Browse to the Samples website

Browse to http://localhost/HTMLPresenceControls.Samples to view the Samples website.


Troubleshooting

Fiddler

Use Fiddler to examine the requests being made to the HTML Presence Controls Service in order to ensure that they are being made to the correct Url.

Event Log

Running a UCMA application in IIS presents its own set of challenges ... The UCMA application is configured to emit rich logging information to the Event Log - look for these under HTML Presence Controls.

Last edited Sep 15, 2010 at 5:28 PM by gdurzi, version 24

Comments

hufei Apr 19, 2011 at 8:44 AM 
Microsoft.Rtc.Collaboration.Presence.PresenceState does not have a property named "Name"