A Problem Occurred While Connecting to the Server


We’ve all gotten this error before.

ErrorOpening

This can mean any number of things. This article will describe a very specific situation that we discovered with one of our users.

Scenario

Library Settings Applicable to this Scenario

  • Require documents to be checked out before they can be edited? = YES

This setting can be found by navigating to the library > Library Settings > Versioning Settings

  •  Open in the client application

This setting can be set at either the site collection level or the library level

  • Site Collection = Site Actions > Site Settings > Site Collection Features
  • Library = Library Settings > Advanced Settings 

Issue

When a user attempts to open a document in the library noted above, they get the following messages.

New Open Behavior

Server Read-Only This document was opened from a server in read-only mode.

When the user clicks the Edit Document button they then receive this error

ErrorOpening

A problem occurred while contacting the server. If the problem continues, contact your administrator.

Cause

In this particular case, the cause was due to the site collection admin cutting and pasting the library into a manually created folder they had created in Explorer view.

Here are the steps they took to create the problem.

  • User navigated to the site in the web interface
  • Created 2 Document libraries named Library01 and Library02
  • Open the site in Explorer View
  • Right click and create new folder called Manually Created Folder (see image below)Before Library Move
  • Right clicked Library02 and selected Cut
  • Right clicked Manually Created Folder and selected Paste
  • Library02 now resides in the newly created Manually Created Folder

Reason

The reason this breaks the library is due to existing pointers in the content database that will still point to the original location.

Resolution

In order to repair this issue, you must reverse all changes performed

  • Open site in Explorer View
  • Navigate to the Manually Created Folder location
  • Right click Library02 and select Cut
  • Navigate up to the original location the library was created in
  • Right click and choose Paste
  • Right click the Manually Created Folder and choose Delete
  • The correct folder structure will look like the image below

Proper Structure

It’s easy to mistake a library for a folder within a library in Explorer View, and you may not notice any issues until you start using other features/settings within your library. The best advice is to just leave it alone unless you’re fully aware of what you’re doing. Luckily for this user, this was easily remedied and we haven’t seen any major issues because of it. Hopefully that will remain the case.

Troubleshooting Tip

Navigate to the Library Settings of the affected library. Now examine the URL of the library. Are there any directories in the URL that do not match up to a sub site in your site structure? If so, this is likely the folder that was created by the user

Advertisement

Error Opening SharePoint 2013 Site in SharePoint Designer 2013


I recently ran into a user who was getting the following error message every time they attempted to open their SharePoint 2013 site via the web interface in SharePoint Designer.

This action couldn’t be performed because Office doesn’t recognize the command it was given.

The pop-up message will look like the image below.

Untitled picture

The user had both SharePoint Designer 2010 and SharePoint Designer 2013 installed on their PC, which should not be an issue specifially as you can have both on the same computer without issues. You may find when you upgrade a particular SharePoint 2010 farm that your users will need to clear their SharePoint Designer cache in order for the new 2013 designer to work. The cache was not the issue here though.

Resolution

We found that the simple solution to the error was to re-install SharePoint Designer 2013 on the users workstation.

That simple action fixed the issue. The user had tried a repair of Designer which did no help, so a full uninstall then install was needed.

Hopefully this helps you if you run into this issue.

KB2880994 Issue with Person Field – Fix


If your SharePoint environment is like ours and you wait a while to install hotfixes, Cumulative Updates, and Service Packs.

We recently discovered a problem with the following critical hotfix from Microsoft for SharePoint.

KB2880994

The issue we’ve run into and I believe there have been quite a few others also running into this is that in 2013 sites, when you attempt to Edit a list item that has a Person lookup field populated, upon editing, the field will go blank. If the user doesn’t realize it, they will save the list item and the person field is now blank. Data is lost.

The Assigned To field had a username in it, until clicking Edit.

The Assigned To field had a username in it, until clicking Edit.

I found the resolution was to Install the September Cumulative Update.

But, if you’re like us, and need more time to test the CU, you can simply install the below hotfix, which specifically addresses the issue.

KB2889884

There is no reboot required for this install and it will fix exactly this issue.

I hope this helps those of you having this issue. If you’re not aware of the problem, check the article, then check your farm.

Sorry, we’re having trouble reaching the server


Recently we upgraded from SharePoint 2010 Foundation to SharePoint 2013 Standard/Enterprise. As with any upgrade there were some problems, but most were very minimal. This particular problem didn’t impact very many users, but was very frustrating.

Scenario

We had a list that we wanted users to submit a request to, this list we provided the user “Edit” permissions to, but no permissions to the rest of the site. When the user would attempt to complete the form they would get two errors. One during the form entry and one upon submission.

Error 1: Sorry, we’re having trouble reaching the server

Sorry_we're_having_trouble_reaching_the_server

This error is received in the “People Picker” fields of the list form. When attempting to enter a username or display name the user continually receives this message.

Error 2: The server was unable to save the form at this time, Please try again

The_server_was_unable_to_save_the_form_at_this_time

This error is received after completing the form and clicking the Save button

I started out as anyone does looking to Google (I even tried Bing) but all the articles I found that had a similar error message and scenario just didn’t solve the issue. Here some of the things I tried without success.

  • Reload the .NET HTTP Activation
  • Checked and re-checked Alternate Access Mappings.
  • I even tried adding permissions so the users could at least get the People Picker field to successfully run a user query, but I stil couldn’t save.
  • Backup/Restore of Site Collection to same location and different location

Solution

After all of that, I found the simplest of answers that just annoyed the crap out of me. I found that new site collections weren’t displaying the same issues so I decided I needed to start comparing the two. I started in the Site Collection Features menu and sure enough, there was my answer.

On the problem site collection I had the SharePoint Server Publishing Infrastructure feature Activated, which isn’t the cause of the problem directly, but it does by default enable the Limited-access user permission lockdown mode feature. Below is the description of the feature.

Limited-access_user_permission_lockdown_mode

 

There isn’t a lot of documentation on this feature, but when you Deactivate the feature, the issue goes away. It makes sense though that the issue would occur based on the description. It seems this is a security feature for public facing publishing sites so you aren’t accidentally sharing more data with anonymous users than expected, the problem is other users who not using anonymous access but do not have permissions to the top level site will also not be able to edit. Viewing is not affected.

This took me way too much time to solve, and I wish Microsoft didn’t make the default behavior to enable this feature, but such is the case. I hope this helps someone else out there. Good luck.

Sign In As Different User, Where’d You Go My Friend?


Those of us used to the SharePoint 2010 interface should be familiar with the Sign in as Different User option. It was a great feature that helped immensely with troubleshooting and developing in SharePoint.SignInDifferentUser

Low and behold, in SharePoint 2013, this feature is gone. Of course, if you’ve installed 2013, you already knew this. This is old (OOOOOLLLLLDDDDD) news. What might not be old news, is there is a simple way to force SharePoint to allow you to still use the feature. Here it is, in all it’s glory.

On any URL in your SharePoint farm, add the following to the end of the URL.

/_layouts/closeConnection.aspx?loginasanotheruser=true

So your URL will look like this: http://<URL>/_layouts/closeConnection.aspx?loginasanotheruser=true

You’ll then be presented the standard windows authentication box. Go ahead and login as your different user and you’re ready to go.

**WARNING** It seems the feature must have been removed due to caching issues. In testing on my own, I found Logging out using the SharePoint Interface or even closing the Browser tab does not clear the “different” user credentials, thus it is possible for the user who owns the Windows session to still be able to access a SharePoint site as the new account. Even after they have logged back in as themselves. The only remedy for this seems to be to close the browser itself. Even clearing the cache doesn’t always do it.

Be careful using this option. A better way might be to simply run Internet Explorer as yourself, then close when your’e done. Using the above method, though is a great way to test if there are issues with the users profile or settings in the profile such as Internet Explorer settings.

I hope this helps someone.

Add Users in Bulk to SharePoint Groups


The other day I had a user ask to add 600+ users to a SharePoint group. Immediately I knew PowerShell was going to save the day, again. So, here is the script I wrote. You can download the full script along with a sample answer file. All I ask is that you let me know if you run into issues, and know that this script is provided as-is with no warranty or guarantees. I haven’t taken into account all possible errors so my error handling is very limited here.

**Typically it is recommended you use an Active Directory security group, but sometimes we have to make exceptions**

Don’t freak out because of the amount of code. Most of the code is building the menu to make it easy for even the least experienced PowerShell user to use. I write a lot of PowerShell scripts, so I don’t like having to open a script and review it to determine what/how to run it. Yes, I could build a help menu for the script, but I prefer a menu that will simply give me and others on my team the options to choose from. The screenshots below should help you understand what the code is doing. The help menu will bring you to this article.

STEP 1

  • Run the file named Add-SPUser_Group.ps1 from the SharePoint CLI
  • Enter a path to a directory to store the activity log (see below)

Add-SPUser_Group_Log

STEP 2

  • Enter A at the menu (see below)

Add-SPUser_Group_Menu

STEP 3

  • Enter the path and filename of the .csv answer file (example answer file included in script download)
  • Enter the URL of the site to add the users to
  • Enter the Group ID

You can find the Group ID of a SharePoint Group by navigating to the Group in the browser. The ID is in the URL of the group

Add-SPUser_Group_Input

STEP 4

  • The list of Usernames will be displayed to you (Usernames must be in DOMAIN\Username format in your answer file) (see below)

Add-SPUser_Group_UserListing

STEP 5

  • You will see one of the following messages for each user in your answer file
    • “DOMAIN\Username” created and added to “Group ID” (displayed if a user account did not exist in the site. The account is added to the site, then added to the group)
    • “DOMAIN\Username” has been added to “Group ID” (displayed if a user already exists in the site and is added to the group)

STEP 6

  • You will now be brought back to the main menu shown in STEP 2

Download Code

#Region Action Function
#Action taken via user input based on menu option chosen
Function Action ($result)
{	
	if ($result -eq "A")
	{
		AnswerCreate
	}
	if ($result -eq "B")
	{

	}
	if ($result -eq "?")
	{
		clear
		#Opens Default Internet browser and navigates to the below site that holds the instructions for this program
		Start-Process -FilePath "https://techchucker.wordpress.com/2013/09/17/addbulkspusergroups/"
	}
}
#endRegion

#Region PressKey Function

#User must enter any key to continue
Function PressKey
{
	Write-Host "Press any key to continue..." -ForegroundColor Black -BackgroundColor White

	$x = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyUp,AllowCtrlC")

	return clear
}
#endRegion

#Region WebInput Function
#Function to request web input from user
Function WebInput
{
	$inpWeb = Read-Host "Enter the URL of the site to add users to a group"

	return $inpWeb
}
#endRegion

#Region GroupInput Function
#Function to request SharePoint Group input from user
Function GroupInput
{
	$inpGroup = Read-Host "Enter the SharePoint Group ID to add users to"

	return $inpGroup
}
#endRegion

#Region AnswerCeate Function

#Function to take answer file and add multiple users to SharePoint Group
Function AnswerCreate
{
	clear

	#Imports user inputted answer file
	$userList = Import-Csv ($answerFile = Read-Host "Enter path to Answer File (e.g. c:\filename.csv)")
	$web = WebInput
	$group = GroupInput

	Write-Output $userList
	PressKey

	#Iterates through each record storing variables and executing user add
	ForEach ($user in $userList)
	{
		$validateUser = $null
		$LANID = $user."LANID"

		$validateUser = Get-SPUser -Identity $LANID -Web $web -ErrorAction SilentlyContinue #This will throw an error if the user does not exist

		if($validateUser -eq $null)
		{
			Write-Host $LANID "does not exist"
			New-SPUser -UserAlias $LANID -Web $web -group $group
			Write-Host $LANID "created and added to " $group
		}
		else
		{
			#Adds user/s to the SharePoint group
			Set-SPUser -Identity $LANID -Web $web -Group $group	
			Write-Host $LANID "has been added to "$group	
		}
	}	
}
#endRegion

#Region Menu Function

#Function to display the menu for the program
Function Menu
{
	Write-Host "Add Users to SP Groups in Bulk`n`n" -ForegroundColor Black -BackgroundColor White
	Write-Host "Choose the action you would like to perform shown below.`n`n"

	Write-Host "	A	-	Add users in bulk using Answer File`n"
	Write-Host "	?	-	Program Help`n"
	Write-Host "	Exit	Exits this program`n`n"
}
#endRegion

#Region Program Actions
$ErrorActionPreference="SilentlyContinue"
Stop-Transcript | out-null
$ErrorActionPreference = "Continue"

$logPath = Read-Host "Enter log path (c:\Logs)"
$date = Get-Date -UFormat %y%m%d.%H.%M.%S
$logFile = "\" + $date + "_AddUserGroup.txt"

Start-Transcript -path $logPath$logFile -append

do
{
	clear
	Menu
	$result = Read-Host "Enter your selection"
	if($result -ne "exit")
	{
		Action $result
		#Write-Host "Would you like to return to the main menu?`n`n"
		#$confirm = Confirm ($inp = Read-Host "Enter Y or N")
		$confirm = $True
	}
	else
	{
		$confirm = $false
	}
}
while($confirm -eq $True)

Stop-Transcript
#endRegion

ISSUE: KB2844286 RESOLVED with Update KB2872441


Microsoft has finally released an update to the KB2844286 issue with SharePoint. That update is linked below.

http://support.microsoft.com/kb/2872441

We have installed it in our DEV environment and have verified the issue is fixed within our farm. I have also confirmed that you must still have KB2844286 installed and then install KB2872441 as you will still need the other security related patches from KB2844286 (or KB2844285, or KB2844287 depending on OS)

My original post can be found below as I am still updating that post as I get updates.

ISSUE: KB2844286 Security Update on SharePoint 2010

ISSUE: KB2844286 Security Update on SharePoint 2010


Came in today to find the following error message showing up on seemingly random web parts and lists throughout our SharePoint 2010 Foundation farm. ULS Logs on the servers weren’t very helpful.

[This issue has been RESOLVED see updates below]

KB2844286 Error

For the sake of search indexing, here is the text version of the error we are getting.

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

We quickly tracked it down to a Security Update that was applied to our web front end servers last night. Check the OS below to find the KB update associated with your server.

Windows XP and Windows Server 2003

Windows 7 Service Pack 1 and Windows Server 2008 R2 Service Pack 1

Windows Vista Service Pack 2 and Windows Server 2008 Service Pack 2

This is in regard to the following Microsoft Security Bulletin for July 2013

Microsoft Security Bulletin MS13-052

As a temporary workaround, we found uninstalling the update (KB2844286) from your servers (all WFE’s and App servers) then performing an IISReset on the servers will resolve the issue. Several others have experienced this issue as noted in just one of many forums such as the one below

http://social.technet.microsoft.com/Forums/sharepoint/en-US/cc9a557b-93cd-40d5-965c-e0a2f107624d/unable-to-display-this-web-part-error-message-after-patch-kb2844286

If I find there is a solution better than uninstalling I will update this post to reflect that. As of right now, uninstalling this update is the best option.

[Update 7/16/2013 3:40pm]

It appears the error typically appears when a list or web part view has had the XSLT customized. At least in our Farm, that has been the common behavior.

[Update 7/17/2013 10:03am]

Not much of an update, but I’m awaiting contact from our Microsoft TAM to see about this issue. If we don’t hear from them soon, then we’ll be opening a ticket with Microsoft. Luckily we were able to work around the issue by uninstalling.

[Update 7/17/2013 12:50pm]

I just received confirmation from our TAM that Microsoft is aware of 2 issues regarding the patch noted in this article above. One of which appears to be the SharePoint issue we’re having.

[Update 7/17/2013 2:43pm]

Just spoke with our Microsoft Sr. Support Escalation Engineer assigned to our premier support ticket and here is their response (summarized).

“Our product group is currently working on the updated patch. We have no ETA for the new release at the moment.”

Looks like we wait then for a resolution.

[Update 7/17/2013 2:59pm]

One more confirmation from Microsoft Support and a link to the forum MS is using to track the issue publicly. No public information just yet beyond that, however.

“Both the SharePoint and .NET product groups are aware of the issue and they are in the process of fixing the patch.”

Follow the issue at this TechNet Forum

[Update 7/18/2013 9:24am]

So far I have heard of no updated patch being released yet by Microsoft. There were two MS Security Bulletin updates but it doesn’t appear they were related to this issue as they were for Bulletin MS12-006 and MS12-052.

[Update 7/21/2013 12:36pm]

Still no updated patch. Received an e-mail from our MS Support representative and they indicated they too have no ETA on any updates to the security patch. I guess I’d rather they take their time then rush an update out all to break something else. It would be a good idea if Microsoft were to either add a note to the update download page indicating the issue, or just pull the update altogether.

[Update 7/24/2013 8:28am]

I just got a message from our Microsoft Support representative and she informed me there is no update as of yet on a new download for the patch. No surprise there.

[Update 7/25/2013 7:50am]

As you can see from the comments that have arrived thus far, it appears Microsoft has provided a fix to the KB2844286 issue. We are in the process of testing it out in our DEV environment now. Let’s hope it fixes it and doesn’t cause more issues.

[Update 7/25/2013 8:22am]

I am at this point, comfortable with counting this issue RESOLVED. We’ve tested it in DEV and the solution resolves the problem and doesn’t seem to break anything else. We won’t be able to complete the resolution in our Production environment until after hours as we will have to re-install KB2844286 which will require a reboot and the patch requires at the very least an IISRESET.

Go to http://support.microsoft.com/kb/2872441 to download the update. Note: You will need to run an IISRESET for the update to take effect after installing.

SharePoint 2013 Error Writing to RBS Enabled Database


I recently configured a SharePoint 2013 Standard environment for a customer who required RBS for a video streaming service they wanted to build in SharePoint and I came across the following errors.

This is an array of errors I got depending on the site template (2010 vs. 2013) or what service I tried to write with, such as using Windows Explorer or using the Upload Document web interface.

This slideshow requires JavaScript.

Architecture

The architecture of this SharePoint environment was quite simple as you can see below.

  • SharePoint 2013 Standard
  • SQL Server 2012 Standard
  • RBS (FileStream)

All of this lives on the same physical server.

Symptoms

After having configured the SharePoint 2013 content database to use RBS as prescribed in the very useful instructions HERE, the end user gets the above error messages. Most often, the message states something similar to the below message.

Sorry, something went wrong

The URL ‘Shared Documents/filename.docx’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not within the current Web.

You will find later, that this error is not very helpful.

No new documents can be uploaded or created, and existing documents cannot be edited or removed.

Troubleshooting Attempts

I spent and inordinate amount of time troubleshooting this issue. Google searches of the error turned up little useful information. The most common articles I found typically were related to folks that could write small files under 1MB but anything larger wouldn’t write. That wasn’t helpful as I couldn’t write anything.

Checking the BLOB file location and it appeared that I had RBS setup right as the folder was created.

Resolution

It turns out the issue was a permissions issue (as I had expected). It was a SQL permissions issue with the Web Applications service account.

I found that when I added the service account to the db_owner role on the content database, all of a sudden I could write to the site with new files, modify existing files and even delete files. Even the RBS portion was working just fine writing to the BLOB store.

Long story short, here are the instructions to manually add your service account for the web application to the db_owner role on the content database.

  1. Open SQL Server Management Studio
  2. Expand the Database folder
  3. Expand the specific content database you’ve configured for RBS
  4. Expand the Security folder
  5. Expand the Roles folder
  6. Double click db_owner (see below)
  7. SQL Database DBO
  8. In the Role Members section click the Add button (see below)
  9. SQL DBO Add
  10. Select the Web Application Service Account and click OK
  11. Click OK until you have returned to the screen from step 6 above
  12. You should now be able to write to your RBS enabled Content Database

I searched the web for quite some time and found no articles that was experiencing this issue so perhaps it was just a fluke. At first, I thought it was because I pre-created my content databases, but I did try letting SharePoint create the content database through the Add Content Database menu in Central Administration but I had the same issue.

I hope if you are experiencing this issue you find this article and it helps quicker than it took me to find the solution.

Convert Site Template Farm Solution to Sandboxed Solution


Visual Studio to Site TemplateI am the Farm Administrator of a SharePoint 2010 farm for a relatively large organization and we often get requests to deploy site templates found throughout the web. We are still a very small team supporting a large number of users and sites. The difficulty with these requests is that the solutions found are typically farm solutions which require the solution to be available to all site collections within the Web Application. This wouldn’t be an issue, except we are unable/unwilling to support all of these solutions, both in technical and education/training terms.

I have found the easiest solution is to deploy the solution to our DEV environment, deploy a site using that new site template and then I save the site as a template. I can then import that .wsp solution file into a new Visual Studio 2010 project using the very helpful instructions below. I cannot claim any credit for these instructions, however, only credit in finding them.

How to Build a Site Collection Template from A Web Template in SharePoint 2010

Don’t forget to create the new solution as a Sandboxed Solution as opposed to a Farm Solution. I would also highly recommend you are clear with your users/customers that these solutions are not supported by your organization and document the transaction so as to protect yourself and your time. This option will be useful if the solution is to be deployed to a Site Collection. You could just use the exported .wsp file but I like to rename the feature within Visual Studio and package it to look a little more official.