The Blog

One of the biggest kinks I’ve had to work out so far on Windows 8 is fighting with UAC. Since I do a lot of SharePoint 2010 development, I need to run Visual Studio as an Administrator in order for the SharePoint tools in Visual Studio to work properly. After using Windows 8, I quickly found out that you can’t completely disable UAC in Windows 8. Continue Reading →

PeoplePicker Dialog

After installing SharePoint 2010 on Windows 8 RTM, I noticed that the SharePoint PeoplePicker wouldn’t seem to resolve my service accounts. Everything would have a red underline.

After scratching my head for a bit, I realized the PeoplePicker actually did resolve the names properly, it was just that the damned IE10 spell checker was underlining the service account name with almost the exact same underline that is used when SharePoint can’t resolve a name! The clue was when I tried to resolve myself, and I saw that only my last name was underlined. Don’t let it fool you folks!

PeoplePicker Dialog

Permalink

I recently created a custom service application administration page which collected a username and password of a service account. I wanted to display a warning to the user if they were not on a secure HTTPS channel, similar to the one that SharePoint provides when you attempt to start the User Profile Synchronization service. In looking at the out of box pages in the ADMIN directory, the code that SharePoint uses is quite simple:

Here is a link to a panorama I took of Mt. St. Helens from the south side, near the Lahar viewpoint. I had never been to that side of the mountain before, and it was well worth the long trip. The views of the mountain were incredible, and there were several excellent hikes, including Ape Cave, Ape Canyon, Lava Canyon (with an awesome suspension bridge ala Indiana Jones for the kids), June Lake and more. It is also National Forest land, so you can pretty much camp anywhere you want. We just pulled over off the road near Lahar and found a nice secluded spot.

The panorama is of 31 separate photos that I took with the rapid shoot settings on a Nikon D5000. I didn’t have a tripod, just held the camera still as I panned manually. The Microsoft Image Composite Editor did a great job stitching the photos together.

If you’ve seen the out-of-box MySite Host, you’ll notice that it doesn’t have a normal search box included as part of the master page, and instead just has a Find People search box:

The Find People search box on a MySite Host

When you perform a search with this box, you are taken to the people scope results page (PeopleResults.aspx) in the Search Center that is defined in your User Profile Service Application’s My Site Settings > Setup My Sites page.

If you go to your My Site Host’s Site Settings > Site Collection Administration > Search Settings page, you’ll see that by default it’s configured to not use custom scopes, to not show the scopes dropdown, and to use the OSSSearchResults.aspx page for contextual scopes. The settings on this page are completely ignored by the Find People search box on the MySite Host master page (because it looks to the Search Center configuration in the User Profile Service Application).

MySite Host default search settings

If you dig into the mysite.master, you will not find a SearchBox or SearchBoxEx control, and will find that the PlaceholderSearchArea is set to Visible=”false”:

Digging in to the mysite.master, there is a DelegateControl called GlobalNavigation, and if you look at a Feature called MySiteNavigation, you’ll find that it references an ASCX control for this delegate control:

Inside mysitetopnavigation.ascx, you’ll find the reference to the Find People search control, which is a PeopleSearchBoxEx control:

If you want to customize the MySite Host branding and include a normal search box with scope dropdown, you’ll want to use your own master page and include the SearchBoxEx directly. Normally this control is included in the PlaceholderSearchArea, but you can include it manually in your masterpage.

Your first inclination might be to include this control, set UseSiteDropDownMode=”true”, UseSiteDefaults=”true” and then enter your search center url and dropdown settings in the Site Collection Administration > Search Settings page, like so:

This is what you would typically use on any other site, like a Publishing portal, so that an admin of the site could have some level of control over the search box and scopes. However if you try this, you will notice that the dropdown for scopes will never appear.

The MySite Host is a special beast and is configured to know about the User Profile Service Application settings, so the right way to go about this is to 1) use the default MySite Host Search settings (no scopes, no dropdown, see screenshot above). Then configure your SearchBoxEx like this:

You can play with the DropDownMode, but personally I like to use ShowDD_NoContextual because the MySite host is not configured to be indexed by the search server, so a contextual scope doesn’t make much sense to offer anyway.