Friday, February 17, 2012

State Service error while working with infopath forms on Sharepoint 2010 farm

You will get this error while working with infopath forms on a Sharepoint 2010 farm.
"The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator."

This happens because state service application has not been configured properly or it does not have a database and is not associated with default proxy settings. State service is used by SharePoint to store temporary objects.

Follow the steps below to create state service application instance, create database and associate it with default proxy


To create a service application, type the following command:
$serviceApp = New-SPStateServiceApplication -Name "State Service"

If State service already exists and there is no database for it. type the commands below to create one
$ServiceApp = Get-SPStateserviceapplication
New-SPStateServiceDatabase -Name "svcApp_StateService" -ServiceApplication $serviceApp

To associate the State service with default proxy, type in the command below..
New-SPStateServiceApplicationProxy -Name "State Service" -ServiceApplication $serviceApp -DefaultProxyGroup

Once this is done, error you are getting should be gone.








Thursday, February 9, 2012

Error details of correlation id using SQL queries

Execute the below query against the log database usually named as WSS_Logging unless we have changed to something else...


select [RowCreatedTime], [ProcessName], [Area],
[Category], EventID, [Message]
from [WSS_UsageApplication].[dbo].[ULSTraceLog]
 where CorrelationId='<GUID>'


Replace <guid> with correlation id.


Note-: Prior to executing the above query make sure that timer job name "Diagnostic Data Provider: Trace Log " job (you should see this at Central Admin -> Monitoring -> Review job Definitions) is enabled. If the dbo.ULSTraceLog view does not exist this job will create it.

Find error details of correlation ID using powershell

replace the <GUID> with the Correlation Id in below command

get-splogevent | ?{$_Correlation -eq "<GUID>" }

This will give you the details about your specific error like this in the console:
 if you would want these messages to be put into a text or log file instead, you could just add the classic output redirect tag as shown below...
“> C:\SPError.log” after the command like this:

get-splogevent | ?{$_.Correlation -eq "<GUID>"} | select Area, Category, Level, EventID, Message | Format-List > C:\SPError.log

Wednesday, February 8, 2012

clear blob cahce of all web apps using powershell


Below PowerShell script loops through all the web application in a farm and clears the blob cache. 


$WebAppColl = GET-SPWebApplication
foreach($WebApp in $WebAppColl )
{
                [Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($WebApp)
Write-Host "Flushed the BLOB cache for:" $WebApp
$$WebApp.Dispose()
}
$WebAppColl.Dispose()

Direct download links for SharePoint 2010 Service pack, cumulative and other updates

June-2011 CU-: http://support.microsoft.com/kb/2536599
KB Article Number(s): 2536599
Language: All (Global)
Platform: x64
 Location: (http://hotfixv4.microsoft.com/Microsoft%20SharePoint%20Server%202010/sp1/office2010kb2536599fullfilex64glb/14.0000.6106.5002/free/435088_intl_x64_zip.exe)

Aug-2011 CU-:http://support.microsoft.com/kb/2553048
KB Article Number(s): 2553048
Language: All (Global)
Platform: x64
Location: (http://hotfixv4.microsoft.com/Microsoft%20SharePoint%20Server%202010/sp2/office2010kb2553048fullfilex64glb/14.0000.6109.5005/free/438519_intl_x64_zip.exe)

Oct 25-2011 CU-http://support.microsoft.com/kb/2596505/en-us
KB Article Number(s): 2596505
Language: All (Global)
Platform: x64
 Location: (http://hotfixv4.microsoft.com/Microsoft%20SharePoint%20Server%202010/sp2/office2010kb2596505fullfilex64glb/14.0000.6112.5000/free/439904_intl_x64_zip.exe)

Dec 13-2011 CU-: http://support.microsoft.com/kb/2597014
KB Article Number(s): 2597014
Language: All (Global)
Platform: x64
Location: (http://hotfixv4.microsoft.com/Microsoft%20SharePoint%20Server%202010/sp2/office2010kb2597014fullfilex64glb/14.0000.6114.5000/free/441699_intl_x64_zip.exe)

Feb 2012

SharePoint Foundation 2010

April 2012 Update
SharePoint Foundation 2010
SharePoint Server 2010
SharePoint Server 2010





KB Article Number(s): 2598151
Language: All (Global)
Platform: x64
Location: (http://hotfixv4.microsoft.com/Microsoft%20SharePoint%20Server%202010/sp2/office2010kb2598151fullfilex64glb/14.0000.6120.5006/free/449357_intl_x64_zip.exe)



June 2012 Update

SharePoint Foundation 2010

SharePoint Server 2010


KB Article Number(s): 2598354
Language: All (Global)
Platform: x64
Location: (http://hotfixv4.microsoft.com/Microsoft%20SharePoint%20Server%202010/sp2/office2010kb2598354fullfilex64glb/14.0000.6123.5002/free/450081_intl_x64_zip.exe)

Fast Search for SharePoint 2010-: SP1 and CU Aug 2011

Filter only enabled users using User Filter- User Profile import

Import User Profile Information of Enabled User Accounts from Active Directory to SharePoint Portal Server 2003
To import user profile information of user accounts that are enabled in Active Directory to SharePoint Portal Server, follow these steps:
On the Site Settings page of the portal site, on the User Profile, Audiences, and Personal Sites page, click Manage profile database.
On the Manage Profile Database page, click Configure profile import.
On the Configure Profile Import page, in the Source area, click Custom source.
In the Access Account area, type the user account name and password of the user account that has appropriate permissions to access Active Directory.
In the Full Import Schedule area, click to select the Schedule full import check box, and then specify the full import schedule that you want.
In the Incremental Import Schedule area, click to select the Schedule incremental import check box, and then specify the incremental import schedule that you want.

Note If the Schedule incremental import option is not available (appears dimmed), click to select the Import from Active Directory by using the incremental method check box in the Source area.

Important To perform incremental imports for Microsoft Windows 2000 Server Active Directory, the user account that you use to perform the import operation must have the Replicating Directory Changes permission. This permission is not required to perform incremental imports for Microsoft Windows Server 2003 Active Directory. To assign the Replicating Directory Changes permission to the user account that you use to perform the import operation, follow these steps:
Start Active Directory Users and Computers.
On the View menu, click Advanced Features.
Right-click the domain object, and then click Properties.
Click the Security tab.
In the Group or user names list, click the user account that you want to use to perform the import operation.

If the user account is not displayed in the list, click Add, type the name of the user who you want to add, and then click OK.
In the Permissions for UserName list, click to select the Allow check box next to the Replicating Directory Changes permission, and then click OK.
Click OK.
On the Manage Connections page, do one of the following as appropriate to your situation:
Click the name of the domain that you want to edit, and then click Edit.

-or-
Click New connection to add a new domain controller that contains the user profiles that you want to import.
.
On the Edit Connection or Add Connection page (as appropriate to your situation), in the Search Settings area, do the following:
In the Search base box, type the distinguished name (DN) of the Active Directory object from where you want to import the user profiles.

The DN of the search base object defines the location in Active Directory where you want to start your search. The following are examples of DNs:
DC=DomainName, DC=com
CN=Users, DC=DomainName, DC=com
OU=OrganizationalUnit, DC=DomainName, DC=com
In the User filter box, type the following LDAP search filter:
(&(objectCategory=person)(objectClass=user)( !(userAccountControl:1.2.840.113556.1.4.803:=2)))

Under Scope, specify the scope level, page size, and page time-out options that you want.
Click OK.
Back to the top
Import User Profile Information of Enabled User Accounts from Active Directory to Office SharePoint Server 2007
To import user profile information of user accounts that are enabled in Active Directory to Office SharePoint Server 2007, follow these steps:
On the Shared Services Administration page, click User profiles and Properties.
On the User Profiles and Properties page, click View import connections.
On the View import connections page, follow one of these steps as appropriate to your situation:
Click the Active Directory import connection that you want to edit, and then click Edit.
Click New connection to add a new domain controller that contains the user profiles that you want to import.
On the Edit Connection page or on the Add Connection page, following these steps:
In the User filter box, type the following LDAP search filter:
(&(objectCategory=person)(objectClass=user)( !(userAccountControl:1.2.840.113556.1.4.803:=2)))
Follow instructions on the left side of the page to perform other settings as appropriate to your situation.
Click OK.

Back to the top
Import User Profile Information of Enabled User Accounts from Active Directory to SharePoint Server 2010

To import user profile information of user accounts that are enabled in Active Directory to SharePoint Server 2010, follow these steps:
On the Manage Profile Service page, click Configure Synchronization Connections.
On the Synchronization Connections page, click the Active Directory connection that you want to edit, and then click Edit Connection Filters.
On the Edit Connection Filters page, follow these steps:
In Exclusion Filter for Users, change the Attribute drop-down to userAccountControl.
In Exclusion Filter for Users, change the Operator drop-down to Bit on equals.
In the Exclusion Filter for Users, select Filter box typeto 2.
Click Add.
Click OK.