Problems making IIS 7.0 changes for Lync Mobility (MCX)

13 December 2011


I hit a problem when installing the mobility service on Lync running on Windows 2008 (not R2). By default you will be running IIS 7.0 this gives problems with making the changes for the Mobility and Autodiscover services.

The Guide says:

If you use Internet Information Services (IIS) 7.0, you need to perform extra steps to change some ASP.NET settings.

It then goes on to define those steps:

1. Log on to the server as a local administrator.

2. Use a text editor such as Notepad to open the applicationHost.config file, located at C:\Windows\System32\inetsrv\config\applicationHost.config.

3. Search for the following:

<Add name=”CSExtMcxAppPool”

4. At the end of the line, before the ending angle bracket (>), type the following:

CLRConfigFile=”C:\Program Files\Microsoft Lync Server 2010\Web Components\Mcx\Ext\Aspnet_mcx.config”

5. Search for the following:

<Add name=”CSIntMcxAppPool”

6. At the end of the line, before the ending angle bracket (>), type the following:

CLRConfigFile=”C:\Program Files\Microsoft Lync Server 2010\Web Components\Mcx\Int\Aspnet_mcx.config”


However should you try and do step 3 you cannot find <Add name=”CSExtMcxAppPool” this  is because the changes adding these lines are not made until after the you have run the Mobility and Autodiscover services.

Once you run these you can locate the lines and make the changes.

On my system after making the changes and trying to restart IIS to activate the changes IIS would not restart.  Looking in the System Event log there were eight Event ID 2297 errors for different applications pools for example:

The worker process for application pool ‘CSIntConfAppPool’ encountered an error ‘Configuration file is not well-formed XML
‘ trying to read global module configuration data from file ‘\\?\C:\inetpub\temp\apppools\CSIntConfAppPool.config’, line number ‘3’.  Worker process startup aborted.

Further searching showed that the CLRConfigFile parameter that was added when you edited the file was introduced in IIS7.5.

Removing the changes allowed IIS to restart.

After a bit of searching I found a hotfix that addressed adding support for the CLRConfigFile parameter for IIS 7.0.

I applied the hotfix then made the changes to the applicationHost.config file and restarted IIS accepted the changes and restarted without a problem.

Having then gone back to the documentation I thought I’d search for the hotfix in case I’d missed it…… I got a hit 3 pages  from the end saying you should apply the hotfix before making the some changes for high performance. The documentation should have shown this earlier with the original change. I have sent a comment about this documentation problem.


Forwarded Calls don’t contain the Called Party’s number

4 August 2011

When you setup Lync forwarding or simultaneous ring it always passes the original callers number in the FROM field.

Call Flow

In the example shown above +44 123 4567 calls +44 987 6543 the Lync user has setup a call forward to another number +44 765 4321. When you receive the call on +44 765 4321 you see the original caller id +44 123 4567.

SIP Header wise this is what is sent from the Mediation server to the ITSP:


INVITE sip:07654321@;user=phone SIP/2.0
FROM: <;user=phone>;epid=81E23DEAF8;tag=ab6896ea7e
TO: <sip:07654321@;user=phone>
CALL-ID: b983d9b2-c75a-48e3-a702-ec9b5ef98eb0
VIA: SIP/2.0/TCP;branch=z9hG4bK693cdab6
CONTACT: <;transport=Tcp;maddr=;ms-opaque=ed082191311c6e3b>
USER-AGENT: RTCC/ MediationServer
CONTENT-TYPE: application/sdp

As you can see the FROM is set to the external callers number and the TO is set to the forwarded to number. Although this can be useful to the person receiving the call to see where the call is coming from it does however cause issues for some ITSP’s (Internet Telephony Service Providers)

Introduced in CU2 was a fix to allow a REFFERED-BY header to be added however after applying the patch (or even CU3) the header does not appear. It is alluded to here in the KB article

However it mentions that you need to apply 255421 as well which doesn’t exist (I assume this will be corrected). The actual KB article is 2500421  (

Here is explains you need to update the Mediation server config file.

For those of you that have never had to update the config file it is in the Mediation server directory which by default can be found here:

C:\Program Files\Microsoft Lync Server 2010\Mediation Server\MediationServerSvc.exe.config

For the SIP trace above you would modify the file to:

<?xml version=”1.0″ encoding=”utf-8″?>
                <add key=”” value=”true”/>
    <generatePublisherEvidence enabled=”false”/>

Once you save this file (don’t forget you need to run notepad as administrator to save it) you restart the Mediation Server service.

The headers now appear as


INVITE sip:07654321@;user=phone SIP/2.0
FROM: <;user=phone>;epid=DB23987285;tag=c495f66513
TO: <sip:07654321@;user=phone>
CALL-ID: a2c887ef-a162-4b11-87a5-daf222734f18
VIA: SIP/2.0/TCP;branch=z9hG4bK370cbae
CONTACT: <;transport=Tcp;maddr=;ms-opaque=8c6fc24ca0304215>
REFERRED-BY: <tel:+449876543>
USER-AGENT: RTCC/ MediationServer
CONTENT-TYPE: application/sdp


You can see the FROM and TO headers remain the same but you now have a REFFERED-BY header with the called party’s number. The ITSP can then use this value.

Blackberry Support for Lync and OCS 2007 R2

6 April 2011

After a long wait the latest service pack for BlackBerry Enterprise Server now adds support for the IM Client for Lync and OCS R2. As many will know up until this release the only way to use the IM Client on your Blackberry was to retain a legacy OCS 2007 RTM Communicator Web Access (CWA) server running.

The release noted for BES for Exchange SP3 is available here as a PDF.

BES for Exchange SP3 can be obtained from here.

I’ve not had a chance to look how well this works, so if you try it please comment with your thoughts.

Wrong Conferencing number when running OCS/Lync together

16 March 2011


I recently was working on an environment with mixed OCS and Lync pools while they were migrating. One thing that came up was that despite having the new conference bridge number created for Lync the invites from Outlook were giving the old OCS bridge number.

I checked the conferencing number with the PowerShell command


This returned the correct pool and detail expected. I spent some time investigating before finding this way of forcing the number for the site.

Set-CsDialInConferencingAccessNumber -Identity "" -ScopeToSite

After running this with a minute the invites from Outlook showed the new number.

Lync Server 2010 Released on MSDN

17 November 2010

Lync Server 2010 Volume License, Retail etc has appeared on MSDN depending on your MSDN subscription you should be able to download now.

Lync Server

Lync Client (x64)

Lync Client (x86)

Lync 2010 Workload Poster

16 November 2010

The Protocol poster has been updated for Lync it also now a Visio file which is great if you need to tweak it for a specific need. Download it from here. If you want the OCS 2007 R2 poster it is in my previous post here.

Lack of posts at the moment

16 November 2010

Apologies for the lack of posts recently but the Lync launch has been taking up a lot of time and will continue until the new year. Hopefully I’ll be post some titbits over the coming weeks before getting back to more frequent updates in January.

OCS Updates for Sept

25 September 2010

A new set of updates have been released which is good news as the previous versions had been removed for download. Get the details and links to downloads from here. 

As with all previous updates make sure you have installed the OCS2009-DBUpgrade otherwise you will hit problems. Make sure you stop all the OCS services and apply the updates using the ServerUpdateInstaller and the OCS2009-DBUpgrade before restarting the services to avoid any incompatibility issues. It does look like the DBUpgrade has not changed since the July update, they are both dated 1 July.

Overall the patches basically fix the problem with RGS found in the July update and a problem with server with more more than 16 cores.

No new client fixes released as yet.

Setting Lync 2010 policies (OCS Group Policy) with PowerShell

18 September 2010

Important the following information is based on the Release Candidate and could change on RTM. Please check the latest documentation

With the release of Lync Server 2010 (RC) the settings which were deployed using group policy for OCS 2007 R2 are now for the most part sent using in-band provisioning to the client. There are a few setting which are used for Client bootstrapping and therefore still need to be configured in Group Policy.

The majority of group policy settings have been moved to PowerShell commands:

New-CsClientPolicy Create a new client policy either at site or per-user scope
Set-CsClientPolicy Modify an existing client policy
Grant-CsClientPolicy Assign a client policy to a user or group of users
Remove-CsClientPolicy Remove a client policy from a user of group of users
Get-CsClientPolicy Get information on existing client policies


New-CsClientPolicy -Identity SalesPolicy -DisableEmoticons $True          
-DisableEmailComparisonCheck  $True


Here we are creating a policy called SalesPolicy with 2 settings to turn off Emoticons and to turn off checking that the Outlook and Lync are running under the same account.

Now to apply this to the Sales department we can use the following:

Get-CsUser -LDAPFilter "Department=Sales" | Grant-CsClientPolicy       
-PolicyName SalesPolicy

Here we are getting all the enabled users in AD who have a department of Sales and applying the policy to them.

You can also apply the Client Policy in Lync Control Panel as well


There are a large number of settings for the client policy so I won’t reproduce them here either check the documentation of in the Lync Management Shell use the following command to see all the options:

get-help New-CsClientPolicy -full | more

Licensing for Lync Server 2010

15 September 2010

If you thought licensing for OCS 2007 R2 was complicated we now have the licensing for Lync.

The cost of an Enterprise CAL has come down but no longer includes telephony functions. Telephony in Lync server requires the new Plus CAL in addition to the Standard and Enterprise CALs. At the bottom there is the matrix of what each CAL covered both on R2 and Lync

If you have the Microsoft Enterprise CAL suite the Lync Standard and Enterprise CALs are included but the Plus CAL is still an addition.

The Lync client software is available either standalone or is included in the Office Professional Plus 2010 product.

Depending on your current Software Assurance your current OCS 2007R2 licenses as a qualifying license for Lync.

Having read details it has generated a lot of questions in mind and once I have answers I will update everyone.

IM and PresenceInstant Messaging and Presence

Audio, Video and Web Conferencing

Audio, Video, and Web Conferencing

Enterprise Voice

Enterprise Voice Technology

%d bloggers like this: