SharePoint 2013 Login as a different user

Exciting days with the release of SharePoint 2013 beta. First thing i noticed on a setup on one of my servers, is that you do no longer see the option to sign in as a different user. Apparently the link is either missing or has willingly been removed from the UI. A little comparison with a SP2010 environment shows that the actual link for signing in as a different user is /_layouts/closeConnection.aspx?loginasanotheruser=true.

Fortunately the link still works in SP2013, which might make me believe that the link has just been forgotten adn will probably be back in the RTM release. If not, I guess the very first customization a lot of customers will ask for is to have the button back in the User menu.

Change Locale of Site Variation Label in MOSS

Since some time, my customer had a nasty issue for which I did not see a solution at first. My customer is running its Intranet for years now on MOSS and uses a customized Publishing Portal with Site Variations in 3 languages, English, Dutch and French. The only problem with these Site variations is that the source Variation Label was created with the wrong Locale setting. The variation label was created with a name EN, language English (United States) , but with locale Dutch (Belgium) instead of English (United states).

Now when the hierachy was created, the subsite EN was created with the wrong locale. No problem there because you can change the locale of that particular subsite in the Site Settings – Regional Settings.

The problem my customer was facing is that clients targeting the root site collection and thus the Variation root site, where redirected to the wrong subsite if their browser had the locale Dutch (Belgium) defined. These client all ended up on the EN subsite instead of the Variation NL that was created with locale Dutch (Belgium).

The solution for this problem is to change the Locale in the Variation Labels in the root site. Unfortunately you cannot modify this value once the Variation Label is created (the field is greyed out). A possible solution would be to delete the Variation Label and recreate it. Because of the fact that this was the corporate intranet with lots of content on it, I did not feel very comfortable deleting the Variation Label, because this means you would have to delete the subsite as well before being able to recreate the Variation Label after which yould have to restore the subsite’s contents, etc. Furthermore the Variations system in MOSS is already very fragile and this would certainly break some other things.

Now after searching for a while and snooping around in the content database, I found out that these labels are stored in a hidden list in the Root site called, you’ll never guess, … “Variation Labels”. Now my trick for accessing this a hidden list by just typing the URL like http://intra.contoso.com/Lists/Variation Labels/AllItems.aspx did not work.

Powershell to the rescue!

I was able to access the list and change the locale value for the specific Variation Label with the following set of powershell commands:

#First Load SharePoint
[void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

#Connect to SPSite object
$site = New-Object Microsoft.SharePoint.SPSite("http://intra.contoso.com/")

#Connect to root SPWeb
$web = $site.AllWebs |where -FilterScript { $_.Url -eq "http://intra.contoso.com"}

#Connect to Variation Labels list
$list = $web.Lists |where -FilterScript { $_.Title -eq "Variation Labels"}

#Get the List item for the Variation Label
$listitem = $list.Items |where -FilterScript { $_.Title -eq "EN"}

#Check the Value
$listitem["Locale"]

#Modify the value to English (United States)
$listitem["Locale"] = 1033
$listitem.Update()

#Dispose of objects
$listitem.Dispose()
$list.Dispose()
$web.Dispose()
$site.Dispose()

Now if you ever need to chaneg the locale value, then this script will help you out. The only thing you need to find out is the value for your specific language. What I did to find out the specific value was to create a new Variation Label on my test environment with teh locale I wanted and fetched that value with the exact same commands.

Newly published SharePoint 2010 documents

Newly published SharePoint 2010 documents. I came across these through some of the tweets that I am following.

Thanks to Andreas Glaser for tweeting about these documents

 

Technical reference for Microsoft SharePoint Server 2010

Brief Description:

Technical information about the Microsoft SharePoint Server 2010.

Overview:

This document includes technical information about the Microsoft SharePoint Server 2010 provider for Windows PowerShell and other helpful reference information about general settings, security, and tools.

http://www.microsoft.com/downloads/details.aspx?FamilyID=a3b9fa1b-0300-489e-8d67-f14deb4c3a56&displayLang=en

 

 

Operations guide for Microsoft SharePoint Server 2010

Brief Description:

Operate and maintain servers, server farms, sites, and solutions in Microsoft SharePoint Server 2010.

Overview:

This document describes how to operate and maintain your servers, server farms, sites, and solutions in Microsoft SharePoint Server 2010.

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=944519e8-e130-4e7a-8a8d-978b10af77c1

 

 

Operations guide for SharePoint Foundation 2010

Brief Description:

Operate and maintain your servers, server farms, sites, and solutions in Microsoft SharePoint Foundation 2010.

Overview:

This document describes how to operate and maintain your servers, server farms, sites, and solutions in Microsoft SharePoint Foundation 2010.

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=71434993-e26f-43be-b1bc-1dcae65d46b5

 

 

Planning guide for Microsoft SharePoint Server 2010

Brief Description:

Information and guidelines for planning the deployment of a solution based on Microsoft SharePoint Server 2010

Overview:

This document provides information and guidelines to lead a team through the steps of planning the deployment of a solution based on Microsoft SharePoint Server 2010.

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=10104e47-7dfe-4ae5-a9ea-459e6aebd34e

 

 

Planning guide for Microsoft SharePoint Foundation 2010

Brief Description:

Information and guidelines to lead a team through the steps of planning the deployment of a solution based on Microsoft SharePoint Server 2010

Overview:

This document provides information and guidelines to lead a team through the steps of planning the deployment of a solution based on Microsoft SharePoint Server 2010.

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=206a9f99-c42d-42b2-9094-a3b2ef4fcd12

 

 

Upgrading to Microsoft SharePoint Foundation 2010

Brief Description:

Guide for administrators and IT professionals for upgrading to Microsoft SharePoint Foundation 2010

Overview:

This document is designed to guide administrators and IT professionals through the process of upgrading to Microsoft SharePoint Foundation 2010 from Windows SharePoint Services 3.0.

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=1c001579-1712-4e75-98a4-aa179021e140

 

 

SP2010 Create site without template

I often let my users decide which site template they want to use for their new site collection. In SharePoint 2007 i did this by creating a site collection using stsadm without specifying a site template. this caused the first user to have to select the site template to use. There was no possibility to create a site collection without specifying a site template through central admin.

Now in SP2010, the possibilty to not specify a site template has been built in to Central Admin. When creating a new site through Central Admin, notice that there is now an entry in the Custom tab, called ‘ < Select Template Later … >

Now when your user hits his/her new site collection, he/she will get redirected to the templatepick.aspx page and has to pick a site template.

Unable to edit Document Library Column: Unknown Error

It has been a while since my last post and since then, I encountered some interesting issues, worth writing about. This one amazed me.
One of our users complained that he was unable to edit a standard choice field that he just created in a document library. Whenever he tried to edit the filed he got the dreadfull “Unknown Error” from SharePoint.
A little research and some adjusting of diagnostics logging when reproducing the error, showed the following error in the ULS logs:

Application error when access /_layouts/FldEdit.aspx, Error=Object reference not set to an instance of an object.  
at Microsoft.SharePoint.ApplicationPages.BasicFieldEditPage.get_ContentTypeId()    
at ASP._layouts_fldedit_aspx.__Render__control433(HtmlTextWriter __w, Control parameterContainer)    
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)    
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.RenderChildren(HtmlTextWriter writer)    
at System.Web.UI.Page.Render(HtmlTextWriter writer)    
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter writer)    
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Exception Type: System.NullReferenceException  Exception Message: Object reference not set to an instance of an object.

Now this error does not say much, so I started to look for it in blogs. Now it turns out that someone had faced the exact same issue with oddly enough the exact same name of the column causing the issue. My user had called the column ‘doctype’ . According to the blog post, the name doctype is a reserved word in SharePoint and strangely enough SharePoint does allow you to create a column with that name, but then you will no longer be able to edit it again.

As suggested in that post, I was also able to delete the column using SharePoint Manager 2007 (http://spm.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=22762)

My source: http://www.ureader.com/msg/123210106.aspx.

 

 

 

Revert a SharePoint 2010 site to the WSS3.0/MOSS2007 Look after Visual Upgrade

This question came up in one of my comments recently and I wanted to find out if it was even possible to reveert the look back of a SharePoint 2010 site that has been upgraded from WSS 3.0 or MOSS2007

Thanks to Corey Roth and a comment on his post about I found out the following:

“In SharePoint 2010, there is the concept of a UI Version and it has a value of 3 or 4.  When you upgrade your existing site, it will leave you at Version 3 which looks just like WSS3.  However, you have the capability to upgrade to the new SharePoint 2010 visualizations which is version 4.  If the administrators have the options enabled, you can change your UI version using the UI itself.  It provides the capability to run on Version 3 but get a preview of 4 and then ultimately they can convert to version 4 completely.  However, you may want to do this programmatically or you may want to revert back to version 3 after you have turned off preview mode.  “

So there are already two possible ways of doing it:

1. Using Code: (thanks to Corey Roth)

using (SPSite siteCollection = new SPSite(“http://server/site“))
{
    SPWeb site = siteCollection.OpenWeb()
    {
        site.UIVersion = 3;
        site.UIVersionConfigurationEnabled = true;
        site.Update();
    }
}

2. Using Powershell: (thanks to Tobias Zimmergren)

$site = Get-SPSite(“http://portal“)
$web = $site.OpenWeb()
$web.UIVersion = 3
$web.Update()
$web.Dispose()
$site.Dispose()

SQL Query to identify Kerberos or NTLM connection (by Marc Valk)

 I found myself looking for this query for the second time now and finally decided to post it on my blog [8-|]

This query enables you to find out if your connections towards your SQL server are using Kerberos instead of NTLM. This may help in your troubleshooting or confirmation for your Kerberos implementation on SharePoint.

 If found it back this time on the blog of Marc Valk (http://www.marcvalk.net/2009/04/sql-query-to-identify-kerberos-or-ntlm-connection/)

 SELECT
    s.session_id,
    c.connect_time,
    s.login_time,
    s.login_name,
    c.protocol_type,
    c.auth_scheme,
    s.HOST_NAME,
    s.program_name
FROM sys.dm_exec_sessions s
JOIN sys.dm_exec_connections c
ON s.session_id = c.session_id

Find out which language packs are installed and the build version

I was asked this question yesterday and I remember having tried to find out how to do it. Finally I took some time to search around on the net and found a post by Patrick Heyde.

http://blogs.technet.com/patrick_heyde/archive/2009/09/30/sharepoint-blow-up-in-daily-business-and-nobody-writes-important-stuff-to-the-farm-documentation.aspx

 

which says the following:

3. Which SharePoint language packs were installed?

Answer: check registry

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS\InstalledLanguages\<LCID>

here you will see something like this:

LCID – Reg_SZ – {language pack build level}

1033 – Reg_SZ – 12.0.4518.1000

1031 – Reg_SZ – 12.0.4518.1000

or

LCID – Reg_SZ – {language pack build level}

1033 – Reg_SZ – 12.0.6219.1000

1031 – Reg_SZ – 12.0.6219.1000

Note: It’s important to have all language packs on the same build level!

To get an overview about all Microsoft LCIDs you can use this article: Local ID (LCID) chart

Thanks Patrick, in my case the build version was set to 12.0.6425.1000 which turns out to be SP2

Saving Document to SharePoint using Office 2003 resets choice metadata fields to default values

I was recently facing an issue as described in http://stackoverflow.com/questions/809179/saving-a-document-to-sharepoint-brings-up-web-file-properties-dialog-with-incor

Recap from original post:

Situation:

  • A custom “Master Document” content type inherits from Document
  • The “Master Document” content type has five additional choice fields
  • There are five custom “Document Template” content types that inherit from the “Master Document” content type
  • Each of the “Document Template” content types uses a different Word document template (.dot) file
  • Each of the “Document Template” content types have been added to a document library

Problem:

  1. I click on a document in the library
  2. Document opens up in Word 2003 for me to edit
  3. I make some changes and save
  4. A box pops up called “Web File Properties”. The window contains all of my custom metadata properties and the ContentType field. The ContentType field is set correctly to the current content type. The other fields are reset to their default values. This same window can apparently be opened by going to File -> Properties

This window by itself would be fine except for two reasons:

  • It includes the ContentType column
  • All of my custom metadata properties are visible but are reset to their default values instead of whatever values were previously selected. This means, every time the user wants to save the document, they have to remember what properties were tagged and set them back.

Question:

  1. Can I disable this Web File Properties box?
  2. If no… can I get the fields that show up to be populated to their correct values?
  3. If no… is there a way to disable my fields from displaying in this window?
  4. If no… is this a SharePoint page that I can modify?

***Edit with some more information***

It looks like this only happens in Office 2003 and looks like it affects Choice fields. If I create the same column as a Lookup field, it seems to work.

Edit again

Looks like if the lookup field is a multi-select field then it will not show up in the Web File Properties box at all (single select lookups still work).

edit 10/14/2009

Link to the KB Article mentioned below by Brenda: http://support.microsoft.com/kb/971500/

My Solution:

Of Course the suggested hotfix, which in fact is the June Cumulative Update for WSS did not fix my issue, but I did find a solution at the end.

What really happens when you call the Web File Properties box is that your client will download 3 javascript files from the server:  bform.js, core.js and init.js. You can check this by by opening up the document library causing the issue and clearing your temporary internet files at that time. When you now call the Web File Properties in Word 2003 through File –> Properties, you will notice these 3 script files being downloadin in your temprary internet files folder.

On the SharePoint front-end servers, you can find these files in the 12-hive\Template\Layouts\<LCID> folders, where you have  to replace <LCID> with your language codes installed (1033, English; 1043, Dutch; …. you get the picture, right?)

So the problem is most likely caused by one of those javascript files. Now we have had the issue since we had installed SP2 and the June Cumulative Update. So I decided to restore these 3 script files and play aroun with these files for a while.

As it happens, my problem went away by replacing the bform.js file with a pre-SP2 version and clearing my

So if your issue does not get resolved by the suggested method of Microsoft, which is installing the latest Cumulative Update, then try restoring a previous version of this file and remember that you will need to clear this file from your client’s Temporary Internet Folder to force a download of the latest version from the server.

 

Microsoft SharePoint Server 2010 Evaluation Guide

the following weeks you will be hearing or reading a lot of Microsoft SharePoint Server 2010, because of the MS SharePoint Conference 2009 in Las Vegas this week. I am not so fortunate to be there, but I am scavenging the blogs of those who are to try to get the latest information. [:D]

I came across a posting about a newly released document by Microsoft: Microsoft SharePoint Server 2010 Evaluation Guide on October 19th

I have downloaded the document and already managed to go through it rapidly and I am very surprised by the new features that have been added into the new product.

My favorite new features already that I really want to be getting my hands on are:

  • high availability automatic failover
  • granular content recovery
  • SharePoint Server 2010 preview mode for upgraded sites
  • update management user interface
  • FAST Search for SharePoint
  • the new Usage database

If you also cannot wait to start playing with the new SharePoint 2010 server, then you can already start reading up on the new features and be up to speed when the public beta comes out in a week or two.