Chris Weldon

Rants and musings on .Net, SharePoint, PHP, and consulting.

SharePoint 2013 Tagging - Social Tags, Hashtags, and Keywords

Permalink

SharePoint 2013 is now publicly available and enterprises are taking an earnest look at many of its features, specifically the social features. I won’t lie, I’m a fairly decent microblogger, and at Improving Enterprises we actively use Yammer to communicate company-wide. That feature is increasingly useful to have meaningful conversations when it comes to promoting achievements, asking questions that require a larger audience to answer, and to share transient things like pictures and videos. However, when it comes to sharing documents and collaborating on a project, SharePoint wins over Yammer every time. That’s why we have Office 365 within our company. So, to hear that many of Yammer’s features are now native to SharePoint, I became very interested in digging in - as did my customer.

Improving is not nearly as large a company as the customer I work for. They are a financial institution with 40k+ employees worldwide. As a result, they have a distinct need to be social. But, they are also encumbered with some regulatory restrictions affecting their social deployment. As a result, introducing social across their firm is quite a challenge, especially when there are many stakeholders who are considering multiple competing products, including Jive, The Open Source Q&A System (OSQA), and Yammer.

A large part of social in the listed products and many other social networks is the concept of tagging. SharePoint 2010 started venturing down the path of tags by creating the Tags and Notes board, giving users the ability to tag files and lists publicly (or privately), making it easier to categorize items in SharePoint. You could also enhance your user profile by indicating what topics (Keywords) you should be asked about, giving users a sense that you’re the expert in those key fields. All in all, a good step in the social direction, but still behind the curve.

SharePoint 2013 continued to build on tagging with the introduction of #tags (prononunced hashtags). This is more beneficial to the social story for many reasons. First: hashtags become a first-class citizen in the sense that users no longer have to go out of their way to add a tag to something (like a conversation, comment, or microblog entry). Second: hashtags are always public, meaning that users have the collection of hashtags at their fingertips, giving them helpful hints on how to categorize their entry. Third: hashtags seem to be used anywhere you can tag - whether it’s in conversations, comments, or when tagging documents or libraries.

However, as I continued to dig into the social and tagging story, there seems to be some discrepancies in several of the features. The purpose of this post is to highlight that while #tags seem to be the direction that Microsoft would rather push users to use in their tagging strategy, integrating their existing social tagging strategy seemed to be left behind in SharePoint 2013.

It’s Time to Learn Windows Azure

Permalink

On October 22nd, I’ll be presenting with several of our best Azure consultants at the Windows Azure Developer Camp at Microsoft’s Houston Offices. Improving Enterprises has been working on our Azure competencies for the last couple of years and have had great success at several customer engagements where we deployed solutions to Azure. These engagements combined with the amazing talent we have here at Improving has allowed us to maintain our Microsoft Certified Partnership and become an Azure Circle Partner. In short, this should be an awesome free event.

At this event, we’ll be having not only presentations, but hands-on workshops on the following topics:

  • Windows Azure Cloud Services
  • Windows Azure SQL Database
  • Windows Azure Virtual Machines
  • Windows Azure Access Control Service
  • Windows Azure Mobile Services

If you’ve always been interested in learning about how to make the move to the cloud, there’s never been a better time. This event is free, and everything (food, drinks, the software bits) are provided. It is BYOC (bring your own computer), so make sure to install the Azure Camps Kit ahead of the event! I look forward to seeing you there!

More Info and Registration

SqlCacheDependency in HTTP Module Supporting SharePoint

Permalink

A customer of mine had some code that caches all of the rows from a SQL table in order to ensure the highest possible thruput with low overhead. Unfortunately, the code was caching the data on the first request, and not letting go of the cached data. Therefore, the only way to clear the cache or load new records was to perform an iisreset, taking the website offline. For this production SharePoint instance which serves over 40k employees, this is not an acceptable solution during the day. So, we decided to look into an alternative solution: SqlCacheDependency.

FAST Search Thruput Optimization Troubleshooting

Permalink

The last couple of weeks in September I was tasked with identifying and fixing a problem with our production FAST Search for SharePoint environment: slow crawl rates. Our incremental crawls were taking anywhere between 45 minutes and several hours to run for each cycle, and a full crawl was taking in excess of 65 hours to crawl just under 1 million documents. Atrocious. I had little previous experience administering FAST search environments, and by the end of this process, I feel like a solid power administrator (but still by no means an “expert”). This post is meant to share my thought process, findings, resources, and other information available to me to help identify the bottlenecks and implement a fix to this problem.

SharePoint 2010 FAST Search Errors

Permalink

Today I ran into a slew of interesting errors while working on my customer’s SharePoint 2010 instance. They reported they were receiving errors while trying to search for content on their sites. As is typical, searching had worked before, but was no longer working. For reference, the error when they used the little search box below the ribbon was none other than the obligatory useless standard SharePoint error message:

Useless SharePoint Error

If you get this, it’s time to crack open the Event Viewer and the SharePoint Logs. If you’re not on a single server environment (aka: a Farm), trying to find the Correllation ID is going to be truly fun. However, once you’ve found the Correllation ID, look for the next Unexpected or Critical error. Initially, I came across the following Unexpected error:

1
2
3
CoreResultsWebPart::OnInit: Exception initializing: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader()
at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e)

with the detailed exception being:

1
2
3
4
5
Internal server error exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader()
at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e) System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader()
at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e)

However, when I went digging a little further, I found the following error. If you find it as well, you’re on the same track that I am:

1
Failed to connect to FASTSEARCHSERVER:PORT Failed to initialize session with document engine: Unable to resolve Contentdistributor

FASTSEARCHSERVER:PORT is the server and port of the FAST Search Service you should have already installed. If you find this, your query service application may not be able to talk to the FAST Search Server. I suggest you check for one (or all) of the following.

Ensure the FAST Search Services are Running

First, log in to all to all servers where you have installed the FAST Search Services. You’ll need to open the Services Management console by doing the following:

  1. Go to Start > Run
  2. Type services.msc and press enter
  3. If you have UAC, you’ll be prompted for your Admin username and password

In the list of services, search for the following and make sure all are started:

  • FAST Search for SharePoint
  • FAST Search for SharePoint Monitoring
  • FAST Search for SharePoint Sam Admin
  • FAST Search for SharePoint Sam Worker

If any of them are not started, I suggest shutting them all down. From there, only start the FAST Search for SharePoint service. This should start the other three services as well. Once they are all started, perform an iisreset on the web front ends (especially the one running the SharePoint Search Query and Site Settings Service) and try the search again.

SSL Certificate Problem

If the search is still failing after doing the above check, you need to check to see if the SSL Certificate used for FAST Search communication has expired. I found a great TechNet article (which points to an even better Blog Post by SharePoint Malarkey regarding this problem. Review the instructions in the blog post to verify whether you indeed have this problem.

Is Anyone the Query Server?

If you continue to receive errors after performing the above steps, check your SharePoint logs again for the Correllation ID. Somewhere around there you may find the following Unexpected error that looks similar to that at the top of this blog post:

1
CoreResultsWebPart::OnInit: Exception initializing: Microsoft.SharePoint.SPEndpointAddressNotFoundException: There are no addresses available for this application.

If you look above this error, you may find another Critical error:

1
There are no instances of the Microsoft.Office.Server.Search.Administration.SearchQueryAndSiteSettingsServices started on any server in this farm.

If you indeed see these exceptions, then you need to check this out. Do the following:

  1. Go to Central Administration
  2. Go to Application Management > Manage Services on Server
  3. Go through each of the Servers and see if any of them have the Search Query and Site Settings Service started.
  4. If none have this service started, start this service on the same server that’s running SharePoint Server Search according to the Servers in Farm page.
  5. Run iisreset on the server where you found the Correllation ID.

By this point, things should start looking up and you should actually get a search page with results.

A Factory - Sans Conditionals

Permalink

I attended Austin Code Camp a few weekends ago and had a blast! There were plenty of enthusiastic, passionate individuals gathered and ready to learn - the makings for a great one day conference. While there, I attended the session Must-Know Design Patterns by Rob Vettor. In that session, he discussed several very useful patterns, including the Decorator Pattern, the Factory Pattern, and numerous other useful patterns. In seeing his code samples for the factory pattern, I was a bit disappointed to see his entire block of if/else if/else statements simply moved from his business logic to the factory. While this is still technically the better approach than leaving it in business logic, I find there’s a better way to do this. In fact, there’s a zero case statement way of doing this in C#. If you’re curious to find out how to create a factory without a single if or switch statement, read on.

RESTful Web Services Authentication in Zend Framework

Permalink

Over this past weekend, I spent time working on a new set of web services for an existing customer. Previously, their web services were XMLRPC based, and performed authentication by sending the username and an API key rather than a password over the wire. These web services were secured via HTTPS, but use of HTTPS was not mandatory. Since the API exposed methods that allowed you to create, read, and delete records associated with a customer, the use of this API without using SSL could be disastrous for its customers.

We had multiple outstanding requests to convert our web services to be REST-based and have also had the request to implement OAuth. These are definitely the direction we are heading for the project, but due to resource contraints (i.e. myself being the only developer), I have to be mindful about when I can deliver value. While implementing the new RESTful services this weekend, I finally came upon the authentication requirement which caused me to question: what is the most appropriate mechanism for authenticating my identities? Read on for the justification of what authentication mechanism I decided upon and how I implemented it in Zend Framework.

Setting Up Custom Elastic Bamboo VM for Working With Atlassian OnDemand

Permalink

One of my customers is an Atlassian OnDemand customer (at my recommendation). One of the tools we are starting to use is Bamboo for continuous integration. The beauty of Bamboo as a product is it’s Elastic Bamboo feature. This feature allows CI builds to spin up on virtual machine instances on Amazon’s EC2. This gives me (the developer) quite a bit of flexibility. I gain the ability to have mulitple virtualized environments with different specifications ready to test my software against (think: different versions of PHP, MySQL, *nix, etc.). Furthermore, I can run the build process on much beefier hardware than what Bamboo is currently running on, allowing the tests to complete faster and keep my feedback loop small.

The idea is really great, but the Bamboo team has only one type of EC2 AMI virtual machine image premade for working with Elastic Bamboo - a Java developer’s VM. This meant I needed to customize the virtual machine to add software packages I need to work for PHP development. That was no trivial task, considering the number of problems I ran into just trying to get it running. This blog post should hopefully cover the necessary steps to getting it working.

2011 Accomplishments: Weight Loss

Permalink

2011 was a marathon year for myself and Melissa, for many different reasons. While I always feel the need to revel in my accomplishments, I usually try not to gloat. Yet, looking at that year proved much more fruitful for us in many respects. Beyond all the wonderful comments, positive responses, and other benefits that came with these accomplishments, I feel it necessary to share how the year went in hopes that it may inspire others (including some close friends) to do the same for themselves. In this three part series, I’d like to start with one of our most significant accomplishments: weight loss.

jQuery File Uploader, Cross Domain Requests, and ASHX Web Services

Permalink

Last night I spent all evening (and well into the night) working on a fix for a customer. This customer was using the jQuery File Uploader control to upload pictures to their remote server that’s associated with a customer’s order. The upload control was not reflecting the upload status in the built-in progress-bar. It was immediately advancing to 100% and holding until the upload actually completed. After which point the user would be redirected to the appropriate destination page. This left the potential for users to become confused as to whether the browser was “locked up” and start clicking around and disrupting the upload process. The request was simple: fix the control to reflect the actual upload progress. What I encountered while trying to fix this solution was anything but simple.