Tag Archives: SharePoint

Creating site collections in their own content database

Central Admin doesn’t allow you to choose in which Content Database to create a new Site Collection. With PowerShell its easy:

New-SPSite  `
    –ContentDatabase "WSS_Content_SecondDB" `
    -Url "http://portal.contoso.com/sites/MyNewSiteCollection" `
    -Template "STS#0"  
    -Name "SitecCollectionTest" `
    –Description "A Site Collection created in a separate Content Database"  `
    -OwnerAlias "CONTOSO\Gerben" `
    –OwnerEmail "gerben@contoso.com" `

Making your SharePoint site available outside your own domain

A while back I created a small SharePoint test lab using Virtual Machines on Azure. I had a Domain Controller, a SQL Server and a SharePoint server. SharePoint was configured to host on portal.contoso.com. All machines were part of the same Virtual Network I defined in Azure.

I was able to access the sites from each of the machines within the Vnet. However I didn’t want to RDP into a server machine just to access my SharePoint sites. After setting up the azure end-point I eagerly entered the URL xxxxxxxx.cloudapp.net but was presented with a standard IIS welcome page and not my SharePoint portal.

IIS 8 Standard Welcome Page

IIS 8 Standard Welcome Page

So what’s up with that? Obviously the web browser is able to communicate with the IIS on the SharePoint server, but its not serving up the SharePoint site. The issue here is that IIS has multiple sites hosted on a single IP/Port combination and it decides which one to serve up based the Host Header that the browser includes in its request. When I’m using the browser on my server it sends portal.contoso.com as host header, but from my home machine it will send xxxxxxxx.cloudapp.net as host header which IIS doesn’t recognize.

This is how I solved it:

  1. using the Microsoft Azure portal, create two new Windows Azure endpoints that map between the internal ports for your site and Central Admin to the external ports on your Azure DNS name (xxxxxxxx.cloudapp.net)
    Screenshot showing Windows Azure endpoints for the SharePoint machine

    Windows Azure endpoints for the SharePoint machine

  2. Log on to Central Admin, go to Manage Web Applications and click on the web application that you want to make available
    managing Web Applications in Central Admin

    managing Web Applications in Central Admin


  3. Now Click on the Extend button in the Ribbon and fill in the port, hostheader and URL (way down at the bottom, not shown in screenshot):
    Screenshot of SharePoints pop-up page for extending the web application to the internet zone

    Extending the web application to the internet zone

    In my case I didn’t change any of the authentication options as I did not want to grant anonymous access to the sites. If you do want this, then this is the place to do it

  4. Don’t panic if Central Admin doesn’t show an extra web application. If you open up IIS Manager, you’ll see it

Managed navigation and the “A Default Managed Metadata Service Connection Hasn’t Been Specified” error

So, you’ve decided to enable managed navigation and when you press the “Create Term Set” button you get the error: Failed to Create Term Set: A Default Managed Metadata Service Connection Hasn’t Been Specified

This is occurs when your environment is running Managed Metadata Service and has one or more Managed Metadata Service connections, but none of them have enabled the setting This service application is the default storage location for column specific term sets.

Your new SharePoint site isn’t accesible from the server, but it works from other machines.

You’ve just installed and configured a SharePoint server and you fire-up IE on the server to see if everything works…..Oops, IE keeps asking for your credentials and eventually returns a HTTP 401. Then you notice that the sites are accessible from other machines. In this case you’re running into a security measure called the loopback check security feature. See http://support.microsoft.com/kb/896861 for the details.

Here’s how to disable the check just for your specific sites on that machine with a short PowerShell script:

$sites=@(
    "portal.contoso.com",
    "my.contoso.com"
)
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0" -PropertyType MultiString -Name BackConnectionHostNames -Value $sites

Here is how to completely disable the Loopback check on Windows using a single PowerShell command:

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name DisableLoopbackCheck -Value 1 -PropertyType DWORD