Sunday, 25 September 2011

SharePoint 2010 Mobile Site Disable

Web.Config


<system.web>
<browserCaps>
<result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<filter>isMobileDevice=false</filter>
</browserCaps>
</system.web>

SharePoint Backup and Restore

Backup

stsadm -o backup -url http://sharepointsite -filename D:\Backup\backup.bak

Restore

stsadm -o restore -url http://sharepointsite -filename D:\Backup\backup.bak -overwrite

Thursday, 22 September 2011

Anonymous Users cannot open XLSX files from a SharePoint document library

$siteUrl = "http://URL_of_your_SITE";
$site = New-Object Microsoft.SharePoint.SPSite($siteurl);
$web = $site.OpenWeb();

$enumPerms = [Microsoft.SharePoint.SPBasePermissions];

Write-Host $web.AnonymousPermMask64;
$web.AnonymousPermMask64 = $web.AnonymousPermMask64 -bor $enumPerms::OpenItems
$web.Update();
Write-Host $web.AnonymousPermMask64;

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


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

Wednesday, 3 August 2011

Unable to add selected web part

ERROR:
Assemblies that implement ASP.NET Web Parts and are installed into a partially trusted location, such as the bin directory, must be compiled with the AllowPartiallyTrustedCallersAttribute set for import to succeed.

SOLUTION:
Add [assembly:AllowPartiallyTrustedCallers] to AssemblyInfo.cs

Thursday, 28 July 2011

SharePoint 2010 Change your display of welcome name

In Powershell:

Set-SPuser -identity “DOMAIN\accountname” -DisplayName “Name Surname” -web <URL of Site>

Monday, 18 July 2011

SharePoint Config database log file too big. Solve it! :)

USE SharePoint_Config
GO
ALTER DATABASE SharePoint_Config SET RECOVERY SIMPLE
DBCC SHRINKFILE(N'SharePoint_Config_log', 1)
ALTER DATABASE SharePoint_Config SET RECOVERY FULL
GO