Archive Page 2

SharePoint ecosystem

One of my daughters is in 3rd grade in school and they are studying living organisms (plants, animals, etc.). She brought home the drawing that appears below. It struck me that the elements that go into making an ecosystem for plants and animals are largely the same elements that are needed to create a successful SharePoint implementation. If we follow the same blueprints that have worked so well in nature for thousands of years, we just might be able to create a SharePoint ecosystem that allows every organism to survive and thrive.

SharePoint3

Solved: SharePoint 2013 custom workflow generates duplicate email notifications

Imagine this scenario:

You have a custom SharePoint Designer workflow attached to a list or a library in SharePoint 2013. The workflow runs when an item in the list/library is created or modified, and one of the steps in the workflow is to send an email notification to a user or a group of users. The workflow runs as expected, but your users are telling you that they’re receiving duplicate email notifications. How do I get rid of the duplicate emails?

Solution:

If you check the workflow history, you will probably see that every time an item is added or modified, the workflow runs twice. That’s why you’re receiving two email notifications. But why is the workflow running twice for each item?

The reason for this is timing. If your workflow is very short and the SharePoint server is very slow, the first instance of the workflow may finish well before the item is fully saved and committed to SharePoint. As the item is being processed, the workflow event receiver can fire again, and start another instance of the workflow.

The solution for this problem is to add a step at the end of your workflow which will pause the workflow for a few minutes – I usually set it to 5 minutes and that seems to solve the problem.

PerformancePoint Services error in SharePoint 2010 – code blocks are not allowed in this file

Resolve PPS error below, received when launching Dashboard Designer on a SharePoint 2010 site:

An error occurred during the processing of /sites/sitecollection/BI/Pages/ppssample.aspx. Code blocks are not allowed in this file.

One common solution is to add an exception for the site in question to the web.config:

<PageParserPath VirtualPath="/ /Pages/ppssample.aspx” CompilationMode=”Always” AllowServerSideScript=”true” />

From http://www.jstevensblog.com/post/PerformancePoint-2010-error-resolved-Code-blocks-are-not-allowed-in-this-file-SharePoint-2010.aspx

However, I was not very comfortable with modifying the web.config for a single site collection, plus it doesn’t seem to scale very well – what if I have 100 PPS sites with this problem?

So I did a little more searching online and found the following alternative solution: http://oszakiewski.net/eric/performancepoint-error-code-blocks-are-not-allowed-in-this-file .

The solution is to open the ppssample.aspx in SP Designer and modify a function within the code. I had to adjust the syntax a bit – the blog post syntax was not working for my case. See underlined section below.

My site collection URL is …/sites/sitecollection

The PPS site that’s having the problem is …/sites/sitecollection/BI

So my function looks like this:

function OpenDD()
{ULSrFH:;
var designerRedirect = “_layouts/ppswebparts/designerredirect.aspx”;

    var siteCollection = “/sites/sitecollection/”;


    var siteLocation = “/sites/sitecollection/BI/”;


var siteCollectionUrl = location.protocol + “//” + location.host + siteCollection;
var siteLocationUrl = siteLocation.replace(siteCollection,””);
designerRedirect = siteLocation + designerRedirect + “?SiteCollection=” + siteCollectionUrl + “&SiteLocation=” + siteLocationUrl;
location.href = designerRedirect;
}

It appears to have worked just as well as the first (more common) solution.

SharePoint 2010 Incoming Email problem – email messages will go through, but attachments will not

This problem took awhile to figure out, so I figured it might be helpful to post it.

Setting up incoming email for SharePoint 2010 Enterprise, as instructed by TechNet: http://technet.microsoft.com/en-us/library/cc262947.aspx. Configured SMTP service, set up the Exchange connector, and configured incoming email settings in SharePoint 2010 Central Administration. Created a test document library, configured it with an email alias, and tried sending a test email. Test email went through, so we’re looking good.

Next, sending an email message with an attachment (the library is configured to save both the email message and the attachment). The email message arrives without any issues, and the attachment shows up as well.

Next, another user is going to send a test message with an attachment to the same library. His email message goes through, but no attachment! What’s going on?

In Notepad I opened the message that I sent with an attachment (which worked) and compared it to the message that did not work.

In the attachment section, we’re finding the following:

My email attachment – Works in SharePoint

–_004_07A87DF66A2E0E439EC9B780BDA9C64001AD9B8628USSFA1E1404gl_
Content-Type: text/plain; name=”test file.txt”
Content-Description: test file.txt
Content-Disposition: attachment; filename=”test file.txt”; size=9;
creation-date=”Sat, 03 Nov 2012 04:19:07 GMT”;
modification-date=”Sat, 03 Nov 2012 04:19:07 GMT”
Content-Transfer-Encoding: base64

The other user’s email attachment – does NOT work with SharePoint incoming email.

–_000_1DC0208E869FB44799FE92A148DBCE36040A04ACUSSFA1E1402glob_
Content-Disposition: attachment; filename=”winmail.dat”
Content-Transfer-Encoding: base64
Content-Type: application/ms-tnef; name=”winmail.dat”

Notice the difference in the Content-Type fields – mine is text/plain, while his is application/ms-tnef.

We both specified Plain Text message format in Outlook before sending the messages. So what’s causing the difference in attachment format?

After some research on the topic, we’ve stumbled upon this Technet forum thread:

http://social.technet.microsoft.com/Forums/en-US/sharepointgeneralprevious/thread/6ba45d6f-c988-4ac1-a5b2-2f3d3dec1ac0/

The answer in this thread resolved our problem – changing the properties on the remote SMTP domain in Exchange to never use Rich Text format for messages allowed the attachments to work for all users.

Resolving “User does not exist or is not unique” error in SharePoint 2010

Let’s say you have a SharePoint farm running in your DMZ, part of EXTERNAL domain. There is also an internal domain called INTERNAL. There is a one-way trust from EXTERNAL to INTERNAL domain – External trusts Internal. You are trying to add a user from INTERNAL to your EXTERNAL SharePoint 2010 site and grant them permission, and you’re getting the following error:

User does not exist or is not unique

In the SharePoint logs, you find something like this:

Error in resolving user ‘internal\john.smith:
System.Runtime.InteropServices.COMException (0x8007052E): Logon failure:
unknown user name or bad password.

You suspect that the issue is related to the peoplepicker misconfiguration. Reading the TechNet article on the topic provides some clues:

http://technet.microsoft.com/en-us/library/cc263460(v=office.12).aspx

Running the following STSADM command:

stsadm -o setapppassword -password somepassword12345678

stsadm -o setproperty -url https://sharepointsite -pn
“peoplepicker-searchadforests” -pv
“domain:internal.domain.com,internal\username,password”

However, the error persists – still getting the same error! What gives?

The command is not correct – make sure that you use the proper terms for your AD configuration.
In my case, instead of “domain:internal.domain.com”, I had to use “forest:internal.domain.com”. Here’s the full command:

stsadm -o setapppassword -password somepassword12345678

stsadm -o setproperty -url https://sharepointsite -pn
“peoplepicker-searchadforests” -pv
forest:internal.domain.com,internal\username,password”

How to find out which version and edition of Microsoft SQL Server you are running

This question comes up often: How do I find out which version and edition of Microsoft SQL Server I am running? Is it Enterprise, Standard, or Developer?

It’s actually quite simple to get the answer:

1. Open SQL Server Management Studio (SSMS).
2. Click on the “New Query” button to open a new query window.
3. Enter the following query and click on “Execute”:

PRINT @@VERSION

You should see a query result similar to the following:

Microsoft SQL Server 2008 R2 (RTM) – 10.50.1600.1 (X64)
Apr 2 2010 15:48:46
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)

How to export and import lists and libraries from a SharePoint 2010 site using Powershell

Let’s imagine this scenario:

You have an old SharePoint 2010 site and you need to copy its content to another SharePoint farm.  The site is heavily customized and moving it using traditional methods (backup/restore, export/import, save site as a template) are not going to work well.  Plus you only want content – no need to bring in all of that custom branding baggage.

You can copy the content using PowerShell and two scripts shown below.

Script # 1:   Export all lists and libraries from the source site.


add-pssnapin microsoft.sharepoint.powershell

# specify the site URL to export

$web = Get-SPWeb "http://sharepointURL/sites/site1/web1"

# specify output folder to store exported lists

$path = "c:\admin\export\"

foreach($list in $web.lists)

{

"Exporting " + $list.RootFolder.URL

export-spweb $web.URL -ItemUrl $list.RootFolder.URL -IncludeUserSecurity -IncludeVersions All -path ($path + $list + ".cmp") -nologfile

}

The output of this script should be a number of CMP files in the output directory.  Review these files and remove the lists that should not be imported (such as various Gallery lists).

Script # 2:  Import CMP files into the destination site.


add-pssnapin microsoft.sharepoint.powershell

# specify target SharePoint site to import into

$site = "http://sharepoint/sites/test1"

# specify folder containing exported lists

$folder = "C:\Admin\Import\"

$Files = Get-ChildItem $folder

foreach ($file in $files)
{

$name = $file.Name

"Importing: " + "$folder$name"

import-spweb $site -path ("$folder$name") -includeusersecurity -nologfile

}


RSS Information Week Headlines

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoPath Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Joel Oleson Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Susan Hanley’s KM Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 350,848 hits