Monday, February 18, 2013

PowerShell command to disable the loop-back check



When you use a custom host header to create web application in SharePoint and  browse it from a local machine that is running Microsoft Internet Information Services (IIS) 5.1 or a later version, you may receive an error message that resembles the following:

HTTP 401.1 - Unauthorized: Logon Failed


To resolve this issue execute the following PowerShell command to disable the loop-back check

New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -PropertyType dword

Monday, February 4, 2013

Session state has been disabled for ASP.NET. The Report Viewer control requires that session state be enabled in local mode


You might have seen error when you try to add Report Viewer web part in SharePoint 2010. 

Solution: Open 'SharePoint 2010 Management Shell' and run this command. It should resolve this issue.

Enable-SPSessionStateService –Defaultprovision

Wednesday, January 9, 2013

Options to refresh the content in Staging with Production environment


  1. Use STSADM -o backup/restore
  2. Use STSADM -o export/import
  3. Use Content Deployment Wizard, you can download it from CodePlex SharePoint Content Deployment Wizard 
When you use backup/restore, you get everything - including recycle bin content, running workflows, alerts etc. This may or may not be what you want. Such 'environment-specific' things are not captured in 2 and 3 - the principle difference between 2 and 3 is that you can specify you wish all the objects (e.g. lists) to keep the same IDs. Any customizations made in the 12 or 14 hive  folder, none of these options would capture these. Such customization would need to be deployed  using WSP packages separately.

Wednesday, December 5, 2012

Get-SPDatabase – How to see the SharePoint content DB size

Get-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + " - " + $_.disksizerequired/1024/1024} {Write-Host "`nTotal Storage (in MB) =" ("{0:n0}" -f ($db/1024/1024))}

image
Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name, @{Label ="Size in MB"; Expression = {$_.disksizerequired/1024/1024}}

Get-SPContentDB

Friday, November 2, 2012

User Information List– the hidden list in SharePoint


User info list can be accessed using following URLs. This is a hidden list there is no out of the box option to edit or delete the users from here. Initially I thought it requires custom solution to delete the users from here.

Simple view : ../_catalogs/users/simple.aspx
Detail view: ../_catalogs/users/detail.aspx

However if you delete the user from ‘People and Groups’ (All people view) using the following URL user info list also reflects it :-)

_layouts/people.aspx?MembershipGroupId=0&FilterField1=ContentType&FilterValue1=Person

Thursday, August 9, 2012

SharePoint 2013 Free Training videos from Microsoft !!

Developer-focused training, walkthrough videos, if anyone is interested.

http://msdn.microsoft.com/en-us/office/apps/fp123626.aspx

You may also set up Development environment using Office 365 Developer Site on Cloud and start developing ‘SharePoint 2013 Apps’.

Also http://msdn.microsoft.com/en-us/library/jj163980(v=office.15).aspx

Happy learning SharePoint :-)

Wednesday, July 11, 2012

Cannot start service SPUserCodeV4 on computer – Sandboxed solution

You might get this error while deploying a sand boxed solution

Error    1    Error occurred in deployment step 'Activate Features': Cannot start service SPUserCodeV4 on computer 'XXXXXXXX'.

The above error can be resolved by starting the service below in Central Admin >> System Setting >>Manage services on server

Microsoft SharePoint Foundation Sandboxed Code Service