SharePoint Pages are not loaded correctly behind Load Balancer.


Assume following scenario ;
You have a custom 3rd party load balancer and you would like to publish only a Subsite of a site collection in SharePoint 2010 through NLB. This scenario is one of specific one , and usually is not supported all load balancers.
Some of 3rd party load balancer can be configure with rules for extra redirections.

In Our Scenario we have
One 3rd party network load balancer (NLB) which is also supporting SSL termination.
And we have a SharePoint farm which is publishing following site
http://blog.bugrapostaci.com -> is our root site collection and we don’t want to redirect through load balancer,
There should be many reasons you don’t want to publish root site directly; security concern, or already referencing another site etc.
http://blog.bugrapostaci.com/Information -> this is our subsite that we want to request through NLB . We are assuming that this site is not contains any customization and pure Sharepoin Team site template.
(Because some customized sites can be requesting extra Web Services or URLs to configure)

First you need to configure your load balancer with SSL termination and installing correct certificate which is out of scope for this article then on SharePoint you need to configure Alternate Access Mapping correctly supporting HTTPS termination.

A sample of correct configuration like this;

Internal URL                                    Zone      Public URL
https://blog.bugrapostaci.com  internet https://blog.bugrapostaci.com
http://blog.bugrapostaci.com     internet https://blog.bugrapostaci.com

Than you need to add rules for NLB for redirecting requests to correct server by HTTPS protocol and any URL contains subsite string of “Information” (our subsite part) . For configuration and how to adding rules to NLB you may need to contact with NLB vendor or check for the usage Manuel.

But this rules are not enough; if you check the site you can detect that page is not working correctly. Why ? Because when you make a request a page it has need to make extra sub requests
You can detect which requests are done at background using Fiddler2 or using F12 Developer tool for IE or Firebug extension of Firefox browser.

Here you can see a sample request when I browse the page of http://blog.bugrapostaci.com/Information site

requests

In you can see details; there are 43 requests more.


/Information/SitePages/Home.aspx        38,838  private, max-
/ScriptResource.axd?d=3deuDBoJpstM_vnvogSCBV0kbvg4UPvUtpa
/ScriptResource.axd?d=A9qblnwldHbcO4ZGhCK8Ss2nKdc2cWEIJ75
/WebResource.axd?d=Q1l5fspXysTdsR10hp_rImYHRKCODxQ3Hk5D7d
/_layouts/1033/init.js?rev=lEi61hsCxcBAfvfQNZA%2FsQ%3D%3D
/_layouts/1033/styles/Themable/corev4.css?rev=3TRomkG1g2g
/_layouts/1033/styles/Themable/search.css?rev=T%2Bhraxktc
/_layouts/1033/styles/Themable/wiki.css?rev=9pXM9jgtUVYAH
/_layouts/blank.js?rev=QGOYAJlouiWgFRlhHVlMKA%3D%3D
/_layouts/images/bgximg.png
/_layouts/images/blank.gif

And some of the is directly coming from root site. That’s mean just adding a rule for redirecting only subsite string of “Information” is not enough.Here is a sample list for possible requests coming form when you make a request to Subsite. You should add necessary rules for this requests.

“/Information” -> the subsite url part.
“/_controltemplates”
“/_layouts”  -> Images ,Styles, Javascripts
“/_vti_bin”
“/_wpresouces”
“/App_Browsers”
“/App_GlobalResources”
“/wpresouces”
“/_app_bin”
“/_vti_pvt”
“/_forms”
“/_login”
“/_windows”
“/ScriptResource.axd” -> Handlers
“/WebResource.axd”  -> Handlers.

this sample is only valid for pure SharePoint Team Site Template without customization ; So if you have some customizations and extra webservices requests or using another paths .
I could not you tell extra url names but I can show you how could you catch a fish

You can test with;

Getting a Fiddler,Developer Tool for IE or Firebug extension for Firebug trace on Server without https and make request to your Subsite . You can see all needed requests and files need to be loaded for working this page is correctly. Make a list for it;
Do it same operation behind Load Balancer and test , add missing redirections to 3rd party load balancer rules for them.

Advertisements

About bpostaci
Sr. Support Escalation Engineer in Microsoft.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: