Empty Term Set in custom User Profile Property SharePoint 2013

This problem might occur when creating a custom User Profile Property in SharePoint 2013 that should map to a Term Store data in SharePoint 2013. Probably the same solution in SharePoint 2010 but this is not verified.

The dropdown list under Configure a Term Set does not display any values.

 

Solution is to select Managed Metadata service connection and select Properties in ribbon. Make sure you have defined a Managed Metadata Service.

Verify that “This service application is the default storage location for column specific term sets” is selected. This will most probably solve the problem.

Go back to Manage User Properties under your User Profile Application to create your new property. The term set should now be available to select.

The web application at [URL] could not be found

SPSite site = new SPSite(yourWebUrl) fails in console or win application 

If trying to extecute SPSite site = new SPSite(yourWebUrl) in a windows or console application changes are that you get the following error:

The web application at [URL] could not be found. Verify that you have typed the url correctly. If the url should be serving existing content, the system administrator may need to add a new request url mapping to the intended application.

Set project output to be .Net 3.5 and x64. If not it will fail when executing code!!!

If it works without x64 target it probably works on your dev environment but will fail in producion.

Enjoy…

Backing up existing dll located in GAC

If you have a dll that is added to your (or customers) GAC and would like do a backup before a new dll is added to the GAC there is an easy way of doing this.

If you have a “ACompany.WebSoution.dll” with ID bb4cd2b476dd23f1 and version 1.0.0.0 located in GAC.

Start a command shell:

Go to C:\Windows\assembly\GAC_MSIL\ ACompany.WebSoution \1.0.0.0__bb4cd2b476dd23f1

Under this directory you will find the current running dll that can be backed up if needed.

To add it back you can just drag in into the GAC from any disk location.

Find correlation id info with PowerShell

If you have got an error in SharePoint and have the correlation id there is no need to find the error logs and do a manual search anymore.

Instead you open up a PowerShell console (SharePoint 2010 Management Shell) and then just write the following command (replace the <GUID> with the Correlation Id):

get-splogevent | ?{$_Correlation -eq “<GUID>” }

This will give you all information about the error that exist in log.

Change passphrase in SharePoint 2010

Today when trying to add a new APP server to my existing SharePoint test Farm I could not remember the passphrase. The only way seems to change it with help of PowerShell. I found a post by Mike Smith here  describing the PowerShell command.

From your Start menu select “SharePoint 2010 Management Shell” or Start, “Microsoft SharePoint 2010 Products”, “SharePoint 2010 Management Shell”

Then enter: 
C:\PS> $passphrase = ConvertTo-SecureString -asPlainText -Force
 C:\PS> Set-SPPassPhrase -PassPhrase $passphrase -Confirm

Backup/Restore of SiteCollection in SharePoint 2010

I tried this new feature backup SiteCollection from Central Admin under /_admin/SiteCollectionBackup.aspx.

After backup locally to my computer I had plans to move this backup to another environment and restore it there. After a quick look in Central Admin I could not find any way of restoring the SiteCollection backup.

Solution for this was to use PowerShell instead.

Restore-SPSite -Identity http://urlToYourApp -Path “\\pathToBackup\YourBackup.bak” -Force

Remote Server Administration Tools (RSAT) for Windows 7

Remote Server Administration Tools (RSAT) for Windows 7.

Remote Server Administration Tools for Windows 7

Brief Description
Remote Server Administration Tools for Windows® 7 enables IT administrators to manage roles and features that are installed on computers that are running Windows Server® 2008 R2, Windows Server® 2008, or Windows Server® 2003, from a remote computer that is running Windows 7.