2

Closed

Using HNSC for MySite

description

The user profile service application provision does not work when a host named site collection is used for the mysite host.

First, the code for Create MySites Web Application and Create MySites Site Collection must be commented out in the function CreateUserProfileServiceApplication as this code will only create a path based site collection. Alternatively the MySite Host can be created during the web application provisioning if its included in the site collections list.

The second issue is the site URL is not detected properly as the script uses the following logic to determine the mysite URL:
    $mySiteWebApp = $xmlinput.Configuration.WebApplications.WebApplication | Where {$_.type -eq "MySiteHost"}
    $mySiteURL = $mySiteWebApp.url
    $mySitePort = $mySiteWebApp.port
This URL is the host name site collection URL not the MySite URL.
Closed Oct 9, 2013 at 4:52 AM by brianlala

comments

HosseinAarabi wrote Oct 4, 2013 at 10:32 PM

I believe there should be a logical fork in the AutoSPInstaller right in the begin of the installation.

If using SP 2013, do you want to use HNSC with single Web application or not?

With the HNSC being the default (since this is now the recommended approach by MS).

wrote Oct 9, 2013 at 4:52 AM

Resolved with changeset 103777: Changes in this release (3.95):
  • Moved some things around in AutoSPInstallerMain.ps1 and calling new function CheckXMLVersion (see below)
  • Changed some defaults in the XML e.g. Central Admin Port ="2013" by default (hey why not), "true" changed to "localhost" for easier search & replace, etc.
  • Changed CommonName values for Managed Accounts so they are easier to identify and we now actually use them as references; XML simplified slightly as a result, plus you can create new managed accounts and refer to them by CommonName
  • Web Application database name now specified in the section for consistency with rest of XML, and applicationPoolAccount attribute removed
  • Site collections: Owner attribute now optional (will be automatically detected), plus we can finally specify (& create as required) a separate CustomDatabase per site collection if desired
  • We can now completely bypass the creation of a My Sites web application, and instead specify that a site collection be created for the My Sites host then identify it within the UserProfileServiceApp ("MySiteHostLocation", "MySiteManagedPath"). See XML comments for details.
  • Removed repeated instances of the Search Service Account within EnterpriseSearchService, we now just refer back to the Managed Account for simplicity
  • New function CheckXMLVersion finally takes advantage of the Version attribute in the input XML, primarily so we can warn of potential mismatches between the XML schema and the AutoSPInstallerFunctions.ps1
  • Get-spserviceaccountxml function renamed to Get-SPManagedAccountXML to reflect its extended usage; now returns a managed account based on a given commonName
  • Fixed AssignCert and Add-LocalIntranetURL functions to better detect multi-level domains e.g. xyz.abc.corp.net
  • Can now specify additional managed accounts and assign them to specific web apps by way of their commonName matching the "Type" attribute of the web app
  • Streamlined syntax for certain string operations
  • Changes to User Profile functions to detect & allow using other locations than a dedicated My Sites web app for the My Site host and My Site Managed Path
  • Fixed ConfigureDistributedCacheService function so it will only update the process identity after we have identified that the Distributed Cache service should remain enabled on the current server
  • CreateEnterpriseSearchServiceApp and Get-ApplicationPool functions fixed so we can now actually provision multiple Search Service Applications, and also tweaked these functions to take advantage of the enhancements to the User Profile / My Sites and managed account streamlining stuff above

bobchauvin wrote Jan 20 at 5:45 PM

There don't appear to be any comments in the answer files, per the note above. Any more details would be appreciated.

IvanJosipovic wrote Jan 20 at 6:50 PM

MySites do not support HNSC, you will have to create a mechanisam for provisioning mysites under the hnsc.

platinumdogs wrote Jan 21 at 11:15 PM

HNSC site collections ARE are a supported approach with Mysites, the 1 web app approach works just fine. I've setup both 2010 and 2013 environments in this way using AutoSPInstaller.

I used the 'Portal' type web application for the 1 web app including a managedpath of personal, my edited web app/user profile service app configuration is;
    <WebApplications AddURLsToHOSTS="true">
        <WebApplication type="Portal"
                        name="Portal"
                        applicationPool="SharePoint Default Web Applications"
                        url="http://sp2013"
                        port="80"
                        UseHostHeader="false"
                        AddURLToLocalIntranetZone="true"
                        GrantCurrentUserFullControl="true"
                        useClaims="true"
                        useBasicAuthentication="false"
                        useOnlineWebPartCatalog="false">
            <Database>
                <Name>Portal_Content</Name>
                <DBServer></DBServer>
                <DBAlias Create="false"
                         DBInstance="SERVER\INSTANCE"
                         DBPort="" />
            </Database>
            <ManagedPaths>
                <ManagedPath relativeUrl="help" explicit="true" />
                <ManagedPath relativeUrl="personal" explicit="false" />
            </ManagedPaths>
            <SiteCollections>
                <SiteCollection siteUrl="http://sp2013"
                                HostNamedSiteCollection="false"
                                Owner="xxxxxxxxxxxxx"
                                Name="Portal Home"
                                Description="Portal Home Site"
                                CustomDatabase=""
                                SearchUrl="http://search.pdogs.local"
                                CustomTemplate="false"
                                Template=""
                                LCID="1033"
                                Locale="en-gb"
                                Time24="true">
                </SiteCollection>
                <SiteCollection siteUrl="http://team.pdogs.local"
                                HostNamedSiteCollection="true"
                                Owner="xxxxxxxxxxxxx"
                                Name="Portal Home"
                                Description="Portal Home Site"
                                CustomDatabase=""
                                SearchUrl="http://search.pdogs.local"
                                CustomTemplate="false"
                                Template="STS#0"
                                LCID="1033"
                                Locale="en-gb"
                                Time24="true">
                </SiteCollection>
                <SiteCollection siteUrl="http://my.pdogs.local"
                                HostNamedSiteCollection="true"
                                Owner=“xxxxxxxxxxxxx”
                                Name="My Site Host"
                                Description="My Site Host"
                                CustomDatabase=""
                                SearchUrl="http://search.pdogs.local"
                                CustomTemplate="false"
                                Template="SPSMSITEHOST#0"
                                LCID="1033"
                                Locale="en-gb"
                                Time24="true">
                </SiteCollection>
            </SiteCollections>
        </WebApplication>
    </WebApplications>
        <UserProfileServiceApp Provision="true"
                               Name="User Profile Service Application"
                               ProxyName="User Profile Service Application"
                               MySiteHostLocation="http://my.pdogs.local"
                               MySiteManagedPath="personal"
                               EnableNetBIOSDomainNames="false"
                               StartProfileSync="true"
                               CreateDefaultSyncConnection="false"
                               SyncConnectionAccount=“xxxxx”
                               SyncConnectionAccountPassword=“xxxxx” >
            <Database>
                <ProfileDB>Profile</ProfileDB>
                <SyncDB>Sync</SyncDB>
                <SocialDB>Social</SocialDB>
                <DBServer></DBServer>
                <DBAlias Create="false"
                         DBInstance="SERVER\INSTANCE"
                         DBPort="" />
            </Database>
        </UserProfileServiceApp>
About the only thing this doesn't do is assign the search crawl account permissions on the User Profile Service Application

IvanJosipovic wrote Jan 21 at 11:35 PM

The setup is supported. However, the default mysite provisioning process will create Path Based Sites!

My Sites
When you use both types of site collections with My Sites, consider implementing your own provisioning process to create My Sites as host-named sites instead of path based sites.

http://technet.microsoft.com/en-us/library/cc424952.aspx

wahidsaleemi wrote Jan 22 at 12:35 AM

In SP2013, all MySites are HNSCs by default