Archive for the ‘MS Office SharePoint Server’ Category

MS Office SharePoint Server 2010 Excel Workbook Cannot be Opened Error

February 15, 2013

A document library or Report library was created within a site on SharePoint 2010 and an excel document was uploaded. Once the file was uploaded , upon clicking on the excel document , an error is displayed saying the workbook cannot be opened.

The reason behind this is usually due to the following:-

  1. For excel services and to open the excel document within the browser make sure you have the following Hotfix installed: Windows6.1-KB976462-v2-x64.msu available here.
  2. Or it could be because you use a custom Service Account for all your service application / Excel Services then you need to do either one of the following :
  • Add the Service account to be a Dbowner on your content database that holds the web application
  • Or copy the following script and run it
Add-PSSnapin Microsoft.SharePoint.PowerShell -EA 0
$webApp = Get-SPWebApplication “REPLACE_NAME_OF_WEBAPP”
$webApp.GrantAccessToProcessIdentity(“REPLACE_NAME_OF_SERVICEACCOUNT”)
“Completed”

How to fix 404 not found on SharePoint 2010 browsing User Profile page _layouts/userdisp.aspx

January 9, 2013

The userdisp.aspx page code needs to be changed on any servers providing web application services for the site (the web front ends, for example). On the servers, navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS. Make a copy of the userdisp.aspx file – just in case, so you’ll have something to revert back to! Open the original using Notepad. Look for Scope=”Farm” and change Farm to Web so that it reads Scope=”Web”. Save and close. Repeat on all web servers

How to change the default home page in SharePoint 2007 or 2010

December 31, 2012

Below are four ways to set another page as your home page: (all four work for both 2007 and 2010)

  • From Site Settings (If the publishing features are enabled)
  • From SharePoint Designer
  • From code / API
  • From PowerShell

The first two can be used by Site Owners, the second two can only be used for developers and administrators.

Site Settings (if the publishing features are enabled for a site):

Site Actions, Site Settings, Welcome Page

SharePoint Designer:

Right-click the new page and click “Set as Home Page”.  (For SharePoint 2007 this only appears to work from SharePoint Designer if the file is in the root of the site. I.e. the same place as default.aspx.)

API:

C# and VB developers can use the SPFolder.WelcomePage property. See: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfolder.welcomepage.aspx

PowerShell:

for SharePoint 2010:

$site = Get-SPSite http://yourserver/sites/yoursite

$web = $site.RootWeb   (or $web = $site.OpenWeb(“yoursubsite”)

$folder = $web.RootFolder $folder.WelcomePage = “SitePages/home.aspx”

(or  $folder.WelcomePage = “default.aspx”)

(or  $folder.WelcomePage = “Shared%20Documents/mycustomwebpartpage.aspx”)

$folder.update()

$web.Dispose()

$site.Dispose()

for SharePoint 2007 (the first two lines are different):

[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)

$site = New-Object Microsoft.SharePoint.SPSite(“http://yourserver/sites/yoursite“)

$web = $site.RootWeb

(or $web = $site.OpenWeb(“yoursubsite”)

$folder = $web.RootFolder $folder.WelcomePage = “SitePages/home.aspx”

(or  $folder.WelcomePage = “default.aspx”)

(or  $folder.WelcomePage = “Shared%20Documents/mycustomwebpartpage.aspx”)

$folder.update()

$web.Dispose() $site.Dispose()

Error “Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON” how to resolve in SharePoint 2010 BCS

December 20, 2012

Here are the steps to resolve BCS (SharePoint 2010) Error “Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON”:

Open Powershell (Run as Administrator) and type the following lines:

$bdc = Get-SPServiceApplication | where {$_ -match “Business Data Connectivity Service”}

$bdc.RevertToSelfAllowed = $true

$bdc.Update();

Once above is done, Open the External Content Type in SharePoint Designer 2010 and Click on Edit Connection Properties.

Once the Edit Connection Properties dialog opens, ensure that you have selected the “BDC Identity” value for the Authentication Mode property.
Go Back to the External Content Type read screen in your SharePoint site and hold your Ctrl key and click the refresh button on your browser.
The error “Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON” should now get resolved and you should see results displayed from yor Line of Business.

Free PowerShell Scripts for SharePoint

December 16, 2012

Simplify SharePoint administration tasks with 15 free scripts to automate daily tasks.

Written by subject matter experts, these scripts for SharePoint will fast forward your PowerShell experience.
  • IMPORT-SPSITE: Imports a site from a backup file
  • ADD-SPUSER: Adds a new user to a group in SharePoint
  • REMOVE-SPSITE: Removes a site from the site collection
  • SET-SPITEM: Modifies a list item
  • DISPLAY-SPLIST: Displays all lists
Plus! This script library includes over 60 additional scripts for SQL Server, Active Directory and Exchange

Download

SharePoint performance monitor v2.5

December 14, 2012

Free and easy Sharepoint performance monitoring

  • NEW!: Watches SharePoint’s disk space and disk operation speed
  • Monitors SharePoint performance in real-time
  • Easy to read graphical console
  • Sends email alerts when issues arise
  • Runs in your system tray

Download

SharePoint admin toolset v3.1

December 12, 2012

Simplify and streamline day-to-day SharePoint administration tasks

  • 7 essential tools for monitoring, securing and administering SharePoint
  • Reduces administrative activities from hours to minutes
  • Performs key tasks without the need for deep SharePoint expertise
  • Dramatically enhances site performance
  • Shows what can be accessed by whom in seconds

Download

Create web site from Custom Template in SharePoint 2010 with powershell and STSADM commands

November 19, 2012

There are many questions about creating SharePoint 2010 Web from a custom  site template saved from UI – “Save site as template”. In previous SharePoint  versions, site was saved as STP file, installed with stsadm addtemplate  cmd, then we could find its ID with stsadm enumtemplates cmd,  and create the web once again with stsadm creatweb using the template  with that ID. But in SharePoint 2010 some of this command are  deprecated, like enumtemplates. Also site templates are not stored as STP files.  Instead we save the site template as Solution, WSP.

I tried to overcome this issue, but it is now possible only trough  PowerShell. Here are the steps:

  1. Open some site collection. Create sub Web. Add some test  Document   Library. Go in Site Settings and click “SubWebTemplate”. Give   site template a name (a propose to give “File Name” and “Template Name”   without special characters and blank spaces,  you can always give more   appropriate Description). Lets say we name it SubWebTemplate.   Now you can go to Solution Gallery and view the solution/template as Activated
  2. Test your SubWebTemplate, and create another sub Web   trough user interface in order to verify that created template is OK. If so,
  3. Execute SharePoint 2010 Management shell on the Server
  4. Now we have to enumerate site templates in order to find our custom   template ID. In my case, I created web template from a sub web   sub1 in the site collection   http://sps2010/sites/webtemplate. I named (saved) my template   as SubWebTemplate
    execute this script in PowerShell   to find its ID
    $url = “http://sps2010/sites/webtemplate”   $site= new-Object Microsoft.SharePoint.SPSite($url ) $loc=   [System.Int32]::Parse(1033) $templates= $site.GetWebTemplates($loc)   foreach ($child in $templates){    write-host $child.Name   “  ” $child.Title} $site.Dispose()
    so at the end of   this script you can see custom template ID which differs from default ones   because it starts with GUID identifying solution ID (Web Templates in 2010 are   saved as WSP – Solutions) In my case it was   {E6BD7EFF-8336-4975-BA22-2256970781E2}#SubWebTemplate  
  5. Once again, you must use PowerShell to create Web, but you can not apply   this template on creation, because it is not one of the default farm   templates. I created sub web with url sub3 and do not applied template at this   moment $web = New-SPWeb http://sps2010/sites/webtemplate/sub3  
  6. Our web is created and we have it in PowerShell variable $web. Now we will   apply our custom template to the web   $web.ApplyWebTemplate(“{E6BD7EFF-8336-4975-BA22-2256970781E2}#SubWebTemplate”)

Now we can open our create web http://sps2010/sites/webtemplate/sub3 and  verify that it is created from the site template with the test Document  Library.

Also, once we know the site template ID we can use stsadm createweb cmd to create sub web from the  template: stsadm -o createweb -url  http://sps2010/sites/webtemplate/sub4 -sitetemplate  “{E6BD7EFF-8336-4975-BA22-2256970781E2}#SubWebTemplate”

Source: MK SharePoint UG

Downloadable eBook: Deployment guide for SharePoint 2013 Preview

August 10, 2012

This book supports a preliminary release of Microsoft SharePoint Server 2013 Preview and provides deployment instructions for SharePoint Server 2013 Preview. The audiences for this book include application specialists, line-of-business application specialists, and IT administrators who are ready to deploy SharePoint Server 2013 Preview.

Download

SharePoint 2010 disable document Check Out and Check In

July 19, 2012

If you want to disable both check in/ check out context menu items in the document library then see the following link which describes how to add custom menu items to a document library via a hidden “content editor web part”. Add that to your web part page and add the following to the “source editor”

<script language=”javascript”>
function AddCheckinCheckoutMenuItem(m, ctx, url)
{return;}
</script>

This will override the core.js function which adds these items to the context menu.


Follow

Get every new post delivered to your Inbox.