Monthly archives: March 2012


Using a Reverse Proxy to Automatically Force External Lync Meeting Guests to Use Silverlight Client

Microsoft, in their infinite wisdom, designed Lync in such a way that if members of two organizations deploy Lync and try to schedule meetings with each other, Lync will use federation in order negotiate authentication between the two domains.  This is great if you have a federated relationship with all your partners that you want to hold meetings with.  But what if you want to do ad hoc meetings with unauthenticated guests?  Microsoft gives you two choices.  One is to allow automatic discovery of federated partners, where the Lync servers will negotiate with each other based on published DNS and other settings, and the other is to log into the meeting using the Silverlight client.

There’s just one problem.

If you have the Lync desktop client on your PC and you try to visit an external meeting link, such as and you are not a part of the Contoso organization and you do not have federation set up or do not allow automatic discovery of federated partners, it will fail with a useless numeric error code that means absolutely nothing.  Since the desktop client does not allow you log on anonymously, it will never fallback to guest logon, even if the meeting organizer has it enabled for the meeting.

TechNet to the rescue!  All you have to do is append “sl=1” to the end of the query string of the URL, so that you visit and then it will force the Silverlight client, which will allow you to log on anonymously.  In this scenario, Lync meetings then behave basically like WebEx or GotoMeeting, where external participants need a browser plugin to connect to the meeting.  Perfect.  That’s exactly what I want.

Again, one problem.  Imagine trying to get your entire staff to always remember to append that to the meeting link when they set up external meetings.  Despite best efforts, it’s just not going to happen.  Your CFO has better things to do and she will forget, because that is human nature.  And, really, this is Microsoft’s shortsightedness here.  You can read my comment at the TechNet article linked above.

Thanks for the "?sl=1" trick. That did the trick for me. But explaining this to my users is going to be a pain. Imagine me in the CFO's office after months of extolling the virtues of Lync and how we even got rid of our WebEx subscription because, heck, Lync does meetings too! But suddenly, a meeting participant is also using Lync at his company but we have no federated relationship with each other, so when we click on each other's meeting links it just fails with a terrible numerical error. "I thought this thing could replace WebEx," the CFO bellows, scowling at me in disdain. "Oh, it can," I reply, "just make sure you modify every meeting invitation so that the URL has ?sl=1 at the end of it!" Yea, that will go over well.

Thankfully, there is a workaround.  And due to the way Lync is designed, it’s really not difficult to set up.

When you set up your Lync websites, it creates an internal and external site.  The external site by default uses the non-standard ports 8080 and 4443.  The Lync best practice is to use a Reverse Proxy or firewall port forwarding rules to send traffic destined for the normal web ports to the Lync alternate ports.  Your internal users, on the other hand, use ports 80 and 443 as normal, directly communicating with the Lync server.

Reverse proxies can also be set up to modify URLs before the connection is sent to the backend.  This is known as URL Rewriting.  In this case, you want a URL rewrite rule that will modify connections to /meet/ such that ?sl=1 is always added to the end.  I found from trial and error that you get the best results by only modifying the /meet/ part of the above URL (assuming you are using Simple URLs like that).  So I set up my topology so that 8080 and 4443 were exposed directly to the outside so I have an option to bypass the reverse proxy once the connection is established.  This is all completely secure and transparent to the end user.  We’re not bypassing the firewall, just the reverse proxy’s URL rewriting when it is not needed.

So the final topology looks like this.  (The Lync Front End is either your Edge server or your single server depending on the size of your deployment.)

Lync Diagram

From outside my firewall, ports 80, 443, 8080, and 4443 are all open.  If you connect to 80 or 443, you are sent to the reverse proxy.  If you go to 8080 or 4443, you are sent directly to Lync.

To prepare Lync for this configuration, I first edited the topology so that the published ports are assigned the same as the internal (8080 and 4443) as this will allow us to bypass the reverse proxy when it is not needed.


Whenever you publish your topology, remember to rerun the Lync setup wizard.

The reverse proxy can be easily created using IIS.  In fact, you can set it up on your Lync edge server if you want.  It depends on your workload.  For the purposes of this post, we’ll assume you are setting it up on the same server.   Note: Lync will stop any non-Lync website in IIS whenever you publish your topology and rerun setup, so be prepared for this!

In order to configure the reverse proxy, you need to install the Application Request Routing and URL Rewrite extensions for IIS.  These both should already be installed if you are using your Lync server.

Enable the Application Request Routing.  This is done at the server level.  Click on your IIS server in the IIS manager, double click Application Request Routing Cache, then click on Server Proxy Settings.  Check Enable proxy and keep everything else at defaults.


Create a new website.  Give it a folder path that is not shared with any other site (i.e., don’t reuse C:\Inetpub\wwwroot).  The bindings should be whatever the external IP address is mapped to through your firewall.  Bind HTTP and HTTPS on the default ports.  Make sure you use a different internal IP address than your Lync internal website so there isn’t a collision.  You don’t want internal users going through the reverse proxy.

Go into the site’s URL Rewrite section and create a dummy rule.  We are going to overwrite this later, so it doesn’t matter what it is.  We just want to create a web.config that we can edit by hand.

Edit the web.config “rules” section for the reverse proxy site.  Now here is where the fun begins.  We are going to modify any request that goes to /meet/ so that it has sl=1 at the end.  I created a rule for both HTTP and HTTPS since I am using default Lync ports (non-standard web ports).  There is also a condition that if the query string already contains sl=, it will not modify it.  Underneath the /meet/ rewrites are the default rules that just pass the request through unmodified to the correct ports.  Obviously, URLs, RegEx, ports, and so on, will all need to be modified to match your environment.

<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="^meet/(.*)" />
<add input="{QUERY_STRING}" pattern="(.*)sl=(.*)" negate="true" />
<add input="{CACHE_URL}" pattern="^(https)://" />
<action type="Rewrite" url="{C:1}://{R:0}?sl=1&{QUERY_STRING}" appendQueryString="false" logRewrittenUrl="true" />
<rule name="ReverseProxyInboundRule2" stopProcessing="true">
<match url="^meet/(.*)" />
<add input="{QUERY_STRING}" pattern="(.*)sl=(.*)" negate="true" />
<add input="{CACHE_URL}" pattern="^(http)://" />
<action type="Rewrite" url="{C:1}://{R:0}?sl=1&{QUERY_STRING}" appendQueryString="false" logRewrittenUrl="true" />
<rule name="ReverseProxyInboundRule3" stopProcessing="true">
<match url="(.*)" />
<add input="{CACHE_URL}" pattern="^(https)://" />
<action type="Rewrite" url="{C:1}://{R:1}" appendQueryString="true" logRewrittenUrl="true" />
<rule name="ReverseProxyInboundRule4" stopProcessing="true">
<match url="(.*)" />
<add input="{CACHE_URL}" pattern="^(http)://" />
<action type="Rewrite" url="{C:1}://{R:1}" appendQueryString="true" logRewrittenUrl="true" />

If you attempt to connect to a meeting externally now, this is what happens.

  1. Browser initiates connection to
  2. Reverse Proxy receives the request, adds sl=1 to the query string, and passes the request to the external Lync website at
  3. Lync server replies and tells the browser to load the Silverlight Lync client which then attempts to connect directly to the lync web services (bypassing the Reverse Proxy) at
  4. The external user can join as an anonymous guest, or log on using the domain credentials of the organizer’s meeting, if they have that.  The desktop Lync client will never launch!

Hopefully in the future Microsoft will fix the desktop client to allow it to log on anonymously to external meetings and also give us a checkbox in the Lync Server Control Panel that allows us to force all external connections to the Silverlight client (for legacy organizations that might connect to ours).


Elfen Lied: One Messed Up (But Awesome) Anime

I just finished watching the Elfen Lied anime, which is based on a fairly long running manga.  The anime was only 13 episodes long, with one 30 minute OVA being produced afterwards.  This anime has been out for a while, so I’m a bit late to the party in commenting on it, but it was such a shocking series, I felt it deserved its own post.

The anime opens with Lucy, a young girl with horns, pink hair, and strange powers, fully nude walking through a building that looks like a cross between a bomb shelter and insane asylum.  As she walks down the hallways, she is ripping guards and scientists to shreds using powers that are explained later in the series.  Blood, bones, guts, and organs splatter everywhere.  This scene sets the tone for the rest of the anime.  I’ve read critics of the series decry this portrayal as over-the-top and gratuitous or simply sex and violence fan service. 

If that’s all you watch and then turn it off, I would agree.  But as you continue to watch the first episode, the mystery of what Lucy is, what that facility she was in is, and how that all relates to the college aged teens she meets who take her in to help her, is absolutely engrossing.  That scene is not the end of the extreme violence and nudity.

As the first few episodes progress, you begin to see the reason behind the over-the-top approach to this anime.  Nearly all of the characters are absolutely tortured.  Without giving away too much of the plot, you have one character who witnessed his sister and father brutally murdered before his eyes at a young age, another who was sexually molested by her step father with her mother accusing her of lying and eventually abandoning her, one whose limbs are mutilated and is left for dead, and several who are tortured repeatedly in gruesome and inhumane ways by authority figures.  The nudity and blood is simply a way to reinforce and help push the sort of emotional twistedness of the extreme horrors the characters have been through.

Nudity in most movies or series is usually a precursor to a love scene.  In this anime it’s more closely tied to something bad, usually quite violent, happening to a character.  It’s actually quite a brilliant mind screw and a good way to get you to empathize with the torture the character is experiencing.

So, yea, not for kids, this one.

My only complaint is that while the first four episodes and last four episodes were strong, the middle was very slow.  This is a weird thing since anime is based on a rather long running manga.  You would think they had plenty of material to work with, but it’s almost like the producers and writers just lost their way in the middle.  The same fights and arguments were fought and argued again and again.  Nothing new really happened.  And the conversations just sounded very forced.  I’m not sure why this happened.  Maybe it was a brief reprieve before the torture started again?  lol.  Also, without giving away the ending, I will just say that it had a satisfying conclusion, but ended with the typical amount of loose ends that most anime series end up having. 

The OVA was apparently never released in the USA, but it’s easy to find on the internet with subtitles.  It takes place in the middle of the series and is rather light hearted compared to the series and answers a few questions that were not otherwise resolved.  Honestly, they should have cut the middle four episodes down to two and added the plot of the OVA into the middle and the pacing would have been a lot better.

So, if you can tolerate watching something that will mess with your emotions and shock you with gruesome violence and gratuitous nudity, this is an anime I have to highly recommend.  The series is on NetFlix.

On a 1-10 scale, I give this anime an 8.  Now I need to go find something to watch on NetFlix that is more uplifting and less disturbing!


Search Posts

Recent Comments

  1. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    ptbNPA: That should have been *ID 810*, not 820

  2. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    ptbNPA: For anyone else coming across this in the future and have an ID 820 error: For some strange reason...

  3. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    Timothy: Sorry, I don't have any other insight. I'm sure you ran into all the same articles I did about the error...

  4. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    ptbNPA: FYI, after posting the issue on technet + with no replies I decided to do a fresh Windows...

  5. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    ptbNPA: Hi and thanks for your post. I originally installed SQL 2016 with SP1 on a Windows server 2016 and got...

  6. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    Timothy: Update Rollup 2.

  7. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    Catwiesl: You write "Microsoft System Center Data Protection Manager (DPM) officially supports SQL 2016 with U...

  8. Re: PowerShell: Quickly Finding the Oldest and Newest Files in a Folder
    Neki: i would like to compare a local file with a remote file and download the remote file if its newer than...

  9. Re: RD Tabs: Tabbed Windows Remote Desktops
    lukas: Fantastic software though I am having issues saving passwords. As soon as I kill the program the setting...

  10. Re: Easy Way to Change Permissions on the Windows Server Scheduled Tasks Folder (C:\Windows\Tasks)
    George: From another server, using an admin account, I opened \\SERVER\c$\windows in Windows Explorer. Tasks...


Tag Cloud