UpdatePanel Troubles with SharePoint 2013

Few weeks ago I had a nasty bug on customer premises where a combination of SharePoint 2013 and ASP.NET UpdatePanel control resulted in some very weird behaviour.

THE SYMPTOMS

Our project consisted of several full-trust code ASPX pages, dutifully placed in _layouts folder. Two of these pages had ASP.NET AJAX UpdatePanel controls to give “a kind of” smooth user interaction experience. The reason to use it was the simplicity of wrapping the existing SharePoint server controls such as grids and buttons in the update panel to prevent page reloads on postbacks. (Yes, I know it’s legacy technology but still, sometimes it’s the best and simplest solution for a given problem).

However, these pages gave random errors as if their event was somehow lost between the UpdatePanel client-side code and the server-side postback. Randomly, we had errors in our pages, with no discernible pattern. The only clue was in the ULS logs, where there were no user claims associated with the request, as if it were a non-authenticated call. What’s worse, as it had no clear cause, our reproduction procedure was to mindlessly click the buttons in the hope of a random error. Needless to say, it was way too inefficient.

Googling around, I found a way to reproduce the errors using Fiddler HTTP debugging tool. The sequence of steps is to make the first page load with Fiddler running in the background. Then, I deleted all the captured traces in Fiddler and clicked the button inside UpdatePanel. Immediately, the UpdatePanel threw the dreaded error.

THE CAUSE

According to the Microsoft KB3062825 article, the cause is the mismatch between the HTTP protocol implementation in UpdatePanel and SharePoint 2013, where instead of returning a 401 code in the handshake, SharePoint returns 200 with the login redirect and the UpdatePanel loses its changes. It only applied to a certain combination of SharePoint 2013 and .NET Framework, and even in these combination it wasn’t certain that the error would happen.

Unfortunately, we were in that situation, with the right combination of SharePoint and .NET versions.

THE SOLUTION

The solution is simple: applying a specific .NET Framework hotfix (for Windows Server 2012 R2, for Windows Server 2012) that’s meant to patch the HTTP protocol handling causing the error. The patch is available via Microsoft support, but it’s not publicly available. I think that it’s because the error isn’t deterministic enough to be included in a regular cumulative update or service pack.

You also have to install SharePoint 2013 SP1, together with a Cumulative Update from December 2014 (or later).

SharePoint Search Alerts and the Case of Only 10 Results

A puzzling SharePoint search alert behaviour was keeping our team of three scratching our heads for days. If you speak Spanish, you can check my teammates’ blog posts about this same error: Ignasi and Miguel.

SYMPTOMS

You have a SharePoint search configured correctly in SharePoint 2010/2013. You search for a keyword and create a search alert for the results.

image

You make more than 10 changes that should trigger the alert. However, the search alert email you receive lists only 10 changes. The rest of the changes are not sent as alerts.

CAUSE

The Search Alert mechanism in SharePoint 2010/2013 is described in great detail in the following MSDN article. In a nutshell, the process is as follows:

  1. The alert is invoked once a day ("daily summary") or once a week ("weekly summary").
  2. The alert runs the query again with the user-supplied search criteria (in my example case: "Hello").
  3. If there are no new results (the results that are more recent than the last time the alert was run), the alert finishes.
  4. If there are new results, they are formatted according to the search alert email template and sent to the user.

There is one tiny bit of missing information here. The step 2, where the search query is run again, has a hidden parameter that limits the number of results that are returned from the search index. If you look inside the SharePoint code that processes the alert, you will find a RowLimit parameter supplied to the query:

image

This searchAlertNotificationQuota is a property that is ultimately established as AlertNotificationQuota property at the SearchApplicationService object in the Sharepoint server object model.

SOLUTION

Run a PowerShell script to update this property in the Search service application and set a  number of returned search results to a value of your convenience. Let’s say 75:

Windows 8 and Synaptics TouchPad Driver

I installed Windows 8 on my Dell Studio laptop two weeks ago, and I found out that the Synaptics TouchPad driver supplied by Dell does not show the touchpad settings screen in Windows 8. I only use that screen to set the touchpad to disable itself when an external USB mouse is plugged in. Well, I could not do it in Windows 8.

Not until now, I mean.

Looking in the forums (specially http://www.sevenforums.com/hardware-devices/149723-synaptics-touchpad-auto-disable-usb-mouse.html and http://forum.notebookreview.com/sager-clevo/449196-np8662-auto-deactivate-touchpad.html) I saw that the solution is very easy indeed: change a single key in the registry.

Literally:

For those of you who want the "Disable internal pointing device when external USB pointing device is attached" option in the synaptics control panel, open regedit and go to HKEY_LOCAL_MACHINESOFTWARESynapticsSynTPEnh, right click and select New > DWORD (32-bit) Value and name it "DisableIntPDFeature". Modify it’s value to 33 in hexadecimal, or 51 in decimal to enable it to be default on.

Works like a charm

image

June Cumulative Updates for SharePoint Released

The WSS 3.0 June 2009 Cumulative Update über-package and MOSS 2007 June 2009 Cumulative Update individual packages are ready for download.

MOSS 2007:

972569 Global
http://support.microsoft.com/default.aspx?scid=kb;EN-US;972569

970948 Global
http://support.microsoft.com/default.aspx?scid=kb;EN-US;970948

970947 Language specific
http://support.microsoft.com/default.aspx?scid=kb;EN-US;970947

972562 Language specific
http://support.microsoft.com/default.aspx?scid=kb;EN-US;972562

972564 Forms Server Global
http://support.microsoft.com/default.aspx?scid=kb;EN-US;972564

WSS 3.0:

971538 uber package
http://support.microsoft.com/default.aspx?scid=kb;EN-US;971538

970946 Global
http://support.microsoft.com/default.aspx?scid=kb;EN-US;970946

The details of the patches are not yet fully available on Microsoft Support site.

The MOSS über-package is not yet ready due to dependencies with Project Server 2007.

(Source: Joerg Sinemus blog)

SharePoint Infrastructure Updates

(a new buzzword to learn, together with “hotfix”, “patch”, “service pack” and “update”.)

Well, the thing is that the good folks at Microsoft have been working hard to fix the most annoying issues with SharePoint and to retrofit the new features they have developed. And the result is that we have two (actually more than two) infrastructure updates available for download:

Infrastructure Update for Microsoft Office Servers (KB951297)

This update adds Federated Search capabilities to MOSS search. It also adds a new streamlined “Search Administration” page. The next good news is that Content Deployment is finally largely rewritten and this fixed up a lot of intermittent errors.

image 

Infrastructure Update for Windows SharePoint Services 3.0 (KB951695)

This update mostly fixes workflow errors.

Download links

32 bits (x86)

64 bits (x64)

WSS/MOSS Running on Vista

The good folks from Bamboo Solutions (these guys make tons of webparts, check them out) have made a setup bootstrapper called WssVista for WSS 3.0 / MOSS 2007 SP1 that enables it to be installed on Windows Vista SP1. You can download it here.

Yes, you are reading well….SharePoint running on Vista. I still can’t believe it…

image

The tool bypasses the built-in setup condition that prompts for a server operating system, thus enabling the SharePoint files to be unpacked to your client machine. Later, the familiar sequence of Setup, Configure SharePoint Tools and Technologies, Central Administration, IISRESET, rinse, repeat…

The IIS 7 that ships with Vista Service Pack 1 is virtually identical to the one that comes in Windows Server 2008, albeit with minor performance downgrades. Toss in the SQL Server 2005 installation on your Vista, and you have the environment for SharePoint "Developer" Edition, hacked provided by Bamboo Solutions.

Of course, it’s TOTALLY UNSUPPORTED by Microsoft and it seems that it will be unsupported forever for a long time. So, install it only for testing purposes and not in a production environment.

More information

Bamboo Solutions Walkthrough for WssVista Tool
http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/05/21/how-to-install-windows-sharepoint-services-3-0-sp1-on-vista-x64-x86.aspx

Microsoft semiofficial statement about SharePoint on Vista
http://blogs.msdn.com/cjohnson/archive/2008/05/23/wssv3-on-vista.aspx

Internet Explorer “Connecting to site 1.0.0.0” and Page Not Found Error

A really weird error happened on one of my older computers, running Windows XP SP2. I successfully established a Wireless connection with an external USB adapter. I opened Internet Explorer and typed a valid address, just to see this strange message in status bar of the browser:

Connecting to site 1.0.0.0…

followed by the infamous Page Not Found screen.

I double-checked Internet Settings Connection tab in IE, I flushed the DNS caché using ipconfig /flushdns command, I disabled IPv6 protocol for the network connections, I reset the adapters….and nothing helped.

Then, searching on Google, I found a deus-ex-machina workaround the solution:

  • Download WinSock XP Fix 1.2 (alias WinSockFix) from here
  • Unzip and run the tool
  • Reboot the PC

winsockxpfix

It worked for me, at least. This tool resets the WinSock (low-level network layer of Windows) configuration to default Windows settings. I suspect that a "rogue" application ruined those settings and was uninstalled without reverting to the original ones, provoking that IE couldn’t make a valid DNS lookup.

SharePoint Hotfix is available

Microsoft released, at least, a quick-and-dirty hotfix that fixes up several issues with SharePoint Services 3.0.

In particular, I’ve found one of the issues to be very annoying. Namely, when you create a site and customize a list view to something other that the default view and then save the site as a template, these changes are not saved. So, when you create another site based on this template, the list view you customized reverts to the default view.

Among other issues, this is solved in the Hotfix that can be found on this address: http://support.microsoft.com/default.aspx?scid=kb;EN-US;934790

Well…now we have to wait for the SP1 to become available…..I hope it will be this year.