Wednesday, 13 March 2013

SharePoint 2010 October 2012 Cumulative Update a nightmare



 Got this error while running the Configuration Wizard on a Test environment which constitutes of a App and WFE server after installing the October 2012 Cumulative Update.

An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown.  Additional exception information: The upgrade command is invalid or a failure has been encountered.
Failed to upgrade SharePoint Products.
Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException: Exception of type 'Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException' was thrown.
   at Microsoft.SharePoint.PostSetupConfiguration.UpgradeTask.Run()
 Resource id to be retrieved is PostSetupConfigurationFailedEventLog for language English (United States)
Resource retrieved id PostSetupConfigurationFailedEventLog is Configuration of SharePoint Products failed.  Configuration must be performed in order for this product to operate properly.  To diagnose the problem, review the extended error information located at {0}, fix the problem, and run this configuration wizard again.
Leaving function StringResourceManager.GetResourceString
Configuration of SharePoint Products failed.  Configuration must be performed in order for this product to operate properly.  To diagnose the problem, review the extended error information located at fix the problem, and run this configuration wizard again.
Entering function StringResourceManager.GetResourceString
Upgrade Timer job is exiting due to exception: System.Data.SqlClient.SqlException: Cannot open database "Search_Service_Application_1_CrawlStoreDB  " requested by the login. The login failed.
Login failed for user


Steps performed to reach towards resolution:

Installed October 2012 Cumulative Update on WFE and APP Server
Ran Product Configuration Wizard and it failed
Tried PSConfig.exe -cmd upgrade -inplace b2b –wait  - This too failed at the last step
Tried psconfig -cmd upgrade -inplace b2b –force – this too failed at the last step
IISRESET to both SharePoint Servers
Restarted SharePoint Timer Service
Restarted SharePoint Search Service
Ran PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures – this one failed at the last step

Failed why: There was an issue with the culture it was finding the culture as United States rather than United Kingdom

Note: The cumulative updates are bundled into one package from October 2012 onwards i.e. contains the foundation, server , language packs in the same package

Ran psconfig -cmd installcheck –noinstallcheck  - this worked fine but failed again at the last step

Failed why: the error was due to the crawl and admin databases of search

Cleared the SharePoint Cache on btoh WFE and APP Servers

Ran Get-SPProduct -local
PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

This solved the issue phew. This was one nasty thing to install the October 2012 CU.

I don't know what I would have done without the ULS Log my good friend.

Tuesday, 12 March 2013

Using Wildcard Certificate for SharePoint 2010 or 2013



Well I had my share of fun to figure out how to use a wildcard certificate for SharePoint. 

The SSL’s were expiring which we had from VeriSign. We had  a wildcard *.domain.com from digicerts.com.
*.domain.com means you can generate a certificate for any sub-domain with in it.

This works fine (for scsm.contoso.com i.e. subdomain.domain.com ) but if you’re generating a cert for second level sub domain i.e.

sp.portal.contoso.com (secondleveldomain.subdomain.domain.com )

For this you will need to generate something called as SAN ( Subject Alternative Name) by creating a duplicate cert and give a fully qualified name i.e. sp.portal.contoso.com . This step may change depending upon who is your provider.

We tried to Complete the Domain Certificate but it wasn’t able complete the cert request got some error. Here is how we were able to use the certificate eventually.

You need to install the certificate on the corresponding server via MMC (Certificates > Computer Account > Tasks > Import the Certificate which your provider has generated)

Now when the certificate is installed, you would need to Export the Certificate  ( right click  on the cert and click on Tasks > Export or Export ) and  Complete a Domain Certificate in IIS via Server Certificates

Bind the same for HTTPS in IIS for the corresponding website and IISReset

Using this we were able to use wild card certificates for SharePoint environment.

You would need to check with your certificates provider if they support SAN (Subject Alternative Name) second level domain certificate. Digicerts does that and we’re happy to be using the same.

Note: This article is just to illustrate the wild card certificate does work for SharePoint subject to your certificates provider and how you do it.

Monday, 4 March 2013

My Site is not available for Public users by default


I recently created couple of environments on SharePoint 2013 as Dev and Proof of Concept. After provisioning a dedicated web app and My Site Host as the root site collection, configuring User Profile Service App I couldn’t find my site options available.



On a further look at the settings of My Site found that it’s private by default and you will have to select the option Make My Site Public i.e.
 
Navigate to User Profile Service App
Under My Site Settings, Click on My Site Setup
Scroll down to the end of the page; Select the Make My Site Public
Click Ok

Now open a new instance of the Browser, navigate to your site and you will be able to see My Site options available i.e. Sites, News feed, Sky Drive

 

Disable Loop Back Check in SharePoint 2013



When you access SharePoint web apps from the SP sever, it keeps on prompting for authentication. I wish the installation of SharePoint could have taken care off. 

Anyways, you can run this to apply the change on the SharePoint servers.

Run this power shell command


New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -PropertyType dword
 
You may have to restart the servers and will have run this from all of your SharePoint servers.

You can also navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa in registry and create the dword32 for DisableLoopbackCheck, modify the value to 1.

I would prefer to use Power Shell any given day.

Thursday, 28 February 2013

WSS Usage Application proxy stopped on SharePoint 2013



The WSS Usage Service Application has still got an issue even with Vanilla SharePoint 2013 environment build. This is more likely a bug with SharePoint 2013 I hope Microsoft fixes this at some point in time.

Here is a screenshot of the same on a proof of concept environment I was building:

 
The Usage and Health Data Collection Proxy stopped. Launch the SharePoint 2013 Management Shell.

Get-SPServiceApplicationProxy

Copy the ID for Usage Service App and paste it below

$UsageApp = Get-SPServiceApplicationProxy | Where {$_.ID -eq "fd3df5dd-7e54-4206-
a28e-76019f1bf6ba"}

$UsageApp.Provision()

 This works now.

Wednesday, 27 February 2013

Create Managed Metadata Service Application via Powershell in SharePoint 2013



In this article, we will go through the steps to create Managed Metadata. The steps are fairly simple but this is one piece which requires thorough planning based on the Organization's taxonomy if defined great if not plan.

There are four steps which are:

1) Plan whether to use a dedicated application pool or a shared one based on various factors

To find out the application pool's exists in your environment, try this in SharePoint PowerShell Management Console

Get-SPServiceApplicationPool

To get the list of managed accounts,

Get-SPManagedAccount

To create a new application pool with dedicated managed service account:

New-SPServiceApplicationPool -Name ManagedMetaDataAppPool -Account contoso\managedmetadata_svc

If you intend to use an existing app pool, change the name below.

2)  Create the Managed Metadata Service Application:

New-SPMetadataServiceApplication -Name "MetadataServiceApp" -ApplicationPool "ManagedMetaDataAppPool" -DatabaseName "MetadataDB"

3) Create the Managed Metadata Service Application Proxy

New-SPMetadataServiceApplicationProxy -Name "MetadataServiceProxy" -ServiceApplication "POFPROD_MetadataServiceApp"

4)  Configure the Service Application Association:

Add Managed Metadata in Service Application Association with the required Web Application. There is a Power Shell to do this shall to accomplish this will update the article at some other time

I would use Power Shell given any day as I can keep the databases clean without any GUID's.