An Office Apps and Services MVP bringing you the latest time saving tips for SharePoint, Office 365, and Ionic.
I’m absolutely excited to be speaking again at SharePoint Saturday Houston this year on May 7, 2011. This event put on by the great people at H-SPUG is one of the most well executed community events in the country. Props go to @Victor_Chat and all of the sponsors, volunteers, speakers, and other people that make this event happen. With over 500 people expected, you know this will be a great event to learn more about SharePoint. I’ll be giving my Intro to SharePoint Development talk where I’ll be hopefully converting numerous new people to the dark side. :)
I’m looking forward to seeing some old faces there as well as meeting some new ones.
This event will be located again at the Norris Convention Center – City Centre (803 Town & Country Lane, Houston, TX 77042).
We’ll see you there!
Follow me on twitter.
#SPSHOU
Whenever you use the Blank Site template for a site collection, a lot of supporting features that you may want are not activated. One of these is the feature for Managed Metadata site columns. When you pick one, you might see the following error.
The required feature is not enabled for this column type.
That’s nice, but why don’t you actually tell me the feature name that I need to activate? I’ve seen a lot of posts on this, and they state to activate the required feature using PowerShell using the GUID of the feature. Some even, dare I say it, recommend you use stsadm. Tsk. Tsk. I don’t know about you, but I can’t remember the GUID off the top of my head. I got tired of having to look up a post every time I need to activate this feature on a new site collection so I decided to figure out what the name was.
If you’ve read my previous PowerShell posts, you know that we can figure this out with Get-SPFeature. This told me that the feature name was actually TaxonomyFieldAdded. Now all we have to do to activate is use the Enable-SPFeature command as you see below. In my case, I am activating it at the site collection located at.
Enable-SPFeature -Id TaxonomyFieldAdded –Url
If all goes well, you’ll get a blank prompt back indicating success. Now when you try to create your managed metadata site column, it should work successfully.
Even if you’re not great with PowerShell, I find that this command is pretty easy to remember. Try it out.
I had been told from the beginning that you can create “simple” public facing websites with SharePoint Online / Office 365. However, I had never seen the setting a place to create the public web site in the beta until recently. If you go to tenant administration (located at) and go to the Site Collections page, there is a new option under the New button in the ribbon.
Clicking on the button, presents you with a dialog asking you about your new public website. There are quite a few options to configure so let’s take a look at them.
After you provide a Title for the site you are asked to provide a URL for the public site. However, by default, the only option you have is. However, you can use your own name if you configure your DNS settings in the Office 365 administration page. I’ll just use the default URL here for today. You are then also prompted for a default language and time zone. Further down the screen you will see a few more options which are required.
You must provide an administrator for the site and then you also have to provide a storage quota and resource usage quota. These require values, so I usually just put in 1000 for each. It’s hard to know at this point how many “resources” a typical site might need. Hopefully, there will be some official guidance on this at some point. Once you do say ok, give it a few minutes to create your new site collection.
When it’s finished provisioning your site collection, you’ll see it in the list.
You are now ready to check out your new public facing web site with SharePoint Online. What does it look like? Take a look at the image below or go to and check it out for yourself.
As you can see it actually creates a simple site with a Page Library. It actually looks nothing like SharePoint either. Clicking on the Member Login link takes you to the Page Library itself where you can edit the pages.
Clicking on one of the pages allows you to start editing.
One issue I did have is that even though I am an administrator I can’t see all of the administration options in the Site Actions menu.
I’m not sure if this is a bug or by design. I’ll probably post something in the forums and ask. However, you can still get to the Site Settings page by going to /_layouts/settings.aspx. Here, you can get to the solutions gallery, master pages, features, etc.. You should be able to brand the site just like you would any other SharePoint site using SharePoint Designer and / or sandboxed solutions with Visual Studio 2010.
That’s a quick look at the public facing site options with Office 365. From my understanding, this is meant for simple public sites and not the equivalent of FIS. I think if you try to build a site or hundreds of thousands of users per day, you’ll quickly exceed your resource quota. However, it’s great for simple brochure type sites that are easy to manage.
I.
To date, I’ve written a few posts on issues that may occur when you are looking to create a search center. Sometimes the site template isn’t present or you receive an error. I recently encountered another issue with the FAST Search Center. The site template was present on the root site collection but it wasn’t present on another site collection. I decided to do some investigating to figure out what the cause was.
I decided to go take a look at the XML files for the site templates in 14\TEMPLATE\1033\XML. There I looked for the file that was most likely search related which happened to be webtempsrch.xml. I saw a listing for all of the usual site templates including one for the FAST Search Center. When I examined the configuration, I noticed that there was an attribute called VisibilityFeatureDependency as you can see in the snippet below.
<Template Name="SRCHCENTERFAST" ID="2000">
="5EAC763D-FBF5-4d6f-A76B-EDED7DD7B0A5" >
</Configuration>
</Template>
The next step was to determine what that feature was so I opened PowerShell and issued the following command.
Get-SPFeature –id 5EAC763D-FBF5-4d6f-A76B-EDED7DD7B0A5
It references a feature called SearchExtensions. It’s responsible for deploying the Visual Best Bet web part among other things. To enable the feature I just used the Enable-SPFeature command that I have talked about before using the URL to my site collection.
Enable-SPFeature –Id SearchExtensions –url
Once I enable that feature, I go back to the site collection and use the New Site menu and sure enough there is my FAST Search Center.
I have my FAST search center back now and that is good, but I have never had an issue with this before. I decided to check another farm. In the above case, I was using February 2011 CU. I went back and checked my RTM build. I started by opening webtempsrch.xml again. It took me a second, but I realized that the feature GUID is different as shown below.
="8581A8A7-CF16-4770-AC54-260265DDB0B2" >
That GUID listed in the RTM file (8581A8A7-CF16-4770-AC54-260265DDB0B2) is for the PremiumSite feature not SearchExtensions like I showed above. I took a look at the dates on the files and I noticed that webtempsrch.xml has a date of 1/19/2011 on the February 2011 CU build. The previous date was 1/9/2010. They changed it. I’m not sure why it changed, but I’m going to consider this a minor bug and will be reporting it. At least it’s easy to work around.
It’s generally pretty easy to create a Search Center or FAST Search Center site. However, on a new installation, there are a few features you need to activate (especially if you are using blank site) that are easy to forget. I’ve talked about not being able to find the Enterprise Search Center site template before. That is caused by not having the SharePoint Enterprise Site Collection feature activated. Another error you might encounter is the following.
An unexpected error has occurred.
This occurs when you have not activated the SharePoint Server Publishing Infrastructure site collection feature and you try to create an Enterprise Search Center or FAST Search Center. I’ve seen inconsistent results here though. Sometimes, you will actually get a useful error message like the one below.
This tells you what you’re clearly supposed to do. I really haven’t determined why you get one error message over the other, but if you get an error creating your Search Center, you know the first thing to check. This post from the SDK also reminds you of which features to turn on. As I said before it’s easy to forget to turn on these features, so I hope this helps if you run into this error. how we deploy web parts to the cloud.
Before we get started, let’s reiterate what we’re working with. With Office 365, your development scenario involves sandboxed solutions. As you know, these solutions are deployed to the site collection level and offer a restricted subset of the SharePoint API. If you are already confortable working with sandboxed solutions, you are in great shape to begin SharePoint Online development.
What does the development environment look like? Well, you know that SharePoint 2010 VM you already have? You’re looking at it. Just like Azure, SharePoint Online development also used the “Over the fence” development methodology. Meaning, you develop your code locally and then throw it over the fence and hope it works. This may sound bad, but it’s really not a big deal and the Azure people have been doing it for a while. AppFabric is close to Azure, but there is always a possibility of differences when you get it in the cloud. As long as you build a sandboxed solution and don’t make use of unsupported features (i.e.: PerformancePoint, BCS, etc), more than likely your code will work when it gets to the cloud. There may be things that you can do in a Sandboxed solution in SharePoint 2010 compared to SharePoint Online, but it’s far too early to tell at this point. To get started developing web parts in the cloud, you pretty much need a copy of SharePoint 2010 (or SharePoint Foundation) installed somewhere locally. This could be native on your Windows 7 machine or inside a virtual machine. Wherever it is, you will obviously need Internet access to get your code to the cloud.
To get started developing in the cloud, the first step is to build the web part on your local SharePoint environment. I won’t go through all the steps here, because most of them are the same from my article on 2010 Web Part Development. However, I will go through the important steps. The first step is to create a new Empty SharePoint 2010 Project in Visual Studio 2010. Specify the URL to a local site on your SharePoint server. Don’t use the address of your SharePoint Online site. It won’t work. When prompted for the solution type, choose Sandboxed Solution.
At this point, you have a regular SharePoint project in Visual Studio. Add a web part to the project just like you would in SharePoint 2010. Sticking with the Hello World type example, we put some code like the following in our web part.
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
namespace SharePointOnlineProject3.HelloCloudWebPart
{
[ToolboxItemAttribute(false)]
public class HelloCloudWebPart : WebPart
{
protected override void CreateChildControls()
{
Controls.Add(new Label() { Text = "Hello, Cloud!" });
}
}
}
At this point, we can test our code locally on our SharePoint server. Build and deploy the project and then add your web part to a test page on your site. Again, if you aren’t familiar with these steps, take a look at my Building and Deploying Web Parts with SharePoint 2010 post. If the code, works you should see a similar page like the one below.
Now, we’re ready to send our web part “to the cloud!”. How do we do that? Start by using the Package menu to build a SharePoint package (.wsp file).
This creates a .wsp file located in the bin folder of the project. We’ll use this file to deploy our web part to the cloud. It’s now time to open up a browser and connect to your instance of SharePoint Online. Once you get there, we deploy a sandboxed solution just like we would on-premises. Go to Site Settings –> Solutions to view the Solutions Gallery. Click on the Solutions button in the ribbon, and then click Upload Solution. Browse to the bin folder of your Visual Studio project and select the file ending in .wsp. Once it uploads, be sure and click the Activate button.
Now, you just need to ensure the feature is activated by going to Site Settings –> Site Collection Features. If it is not activated, click the activate button.
Your web part has now been thrown over the fence and deployed to the cloud! Test it out by going to any page on the site and adding the web part to the page. You’ll find your web part in the Custom section by default. If all goes well, your web part should work here too.
Congratulations, you have now deployed code to the cloud! It’s really not that hard is it? Now, you might be wondering if you can debug your solution. Unfortunately, the answer is no. If you have an issue, you have to step through it locally on your on-premises SharePoint server. That’s all there is to getting started with SharePoint Online development. As you can see it’s very familiar to sandboxed solutions development with your on-premises server.