RSS

Category Archives: Sharepoint Server 2010

Sharepoint “Workflow Auto Cleanup” mystery


Does anyone know that SharePoint workflow history is getting deleted after 60days. By default there is a timer job called “Workflow Auto Cleanup” associated with your web application which will delete all your workflow task history after 60 days  if the status is  Completed or Cancelled.

Now the question is, Does it really deletes whole workflow history?

No, Technically, the workflow history is not deleted. The association between the workflow (what you see on the workflow status page) and the history list is removed. This is done for performance reasons. Once a workflow is completed, by default the connection between the workflow and the workflow history is deleted after 60 days.

Is it Possible to disable this timer job?

Yes, You can disable the “Workflow Auto Cleanup” timer job if you wish to keep the workflow data. however, this is not really recommended due to the potential impact to performance of allowing these lists to grow indefinitely.

To disable automatic workflow cleanup follow below steps

  • From Central Administration, click the Monitoring tab 
  • On the Monitoring page, click Review job definitions.
  • On the Timer Job Definitions page, click Workflow Auto Cleanup to edit the appropriate timer job.
  • On the Edit Timer Job page, click Disable and then click OK to disable the Workflow Auto Cleanup feature.

NOTE: If you later decide that you want to enable automatic workflow cleanup, access this page again and click Enable to enable automatic workflow cleanup.

What is the alternate solution to audit my workflows?

Unfortunately, this auditing report is not available out of the box. However, a custom audit report can be created in Visual Studio in order to extend the auditing functionality to include workflows.Read here

Advertisements
 

Tags: , ,

Resolved: Could not load file or assembly ‘Microsoft.SharePoint.Sandbox, Version=12.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXX’ or one of its dependencies…


I have a remote sharepoint solution that contains SharePoint dll’s reference. Whenever I run the solution, start page get crash and show me this error.

“Could not load file or assembly ‘Microsoft.SharePoint.Sandbox, Version=12.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXX’ or one of its dependencies. An attempt was made to load a program with an incorrect format.”

Well every time I run the project it creates Microsoft.SharePoint.Sandbox.dll and Microsoft.SharePoint.Sandbox.xml inside the bin folder and it creates the problem. Well there are lots many things have written on web regarding this problem. I follow all these things but could not get rid of this error. Finally I decided to fix this problem according to my way. So below are the steps to fix this problem permanently.

1. Inside solution explorer (Visual Studio), select the project and right click on that.

2. From context menu, click on properties.

3. When properties page opens, Click on Build Events.

4. Under Post – build event command line, copy and paste below lines

cd $(TargetDir)

del Microsoft.SharePoint.Sandbox.dll

del Microsoft.SharePoint.Sandbox.xml

Done!

NOTE: please replace with your dll name.

 
 

Manually run PSCONFIG.exe after Installing SharePoint 2010 Patches


Patching  SharePoint 2010  is a two-step process now.

  1. First updated patch binaries has to be installed
  2. Then psconfig.exe must be run manually to update the SharePoint databases.

In order to update the SharePoint databases, you must manually run the PSconfig.exe utility. Follow below steps:

1. Open an command prompt as adminitrator.
2. Change directory to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN
3. Run PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

Note: The sharepoint site will be inaccessible while the command is running. It is best to run the command after office hours.

Known Issues:

Sometimes you might face following error: Sharepoint 2010 Product configuration wizard failing at step 9/10. below is the fix for it.

Solution

  • try clearing the cache.ini
  • you can find it in location C:\ProgramData\Microsoft\SharePoint\Config\GUId
  • go inside the GUID and look for cache.ini
  • reset the value to 1
  • run the command stsadm -o execadmsvcjobs
  • try running the below command
  • psconfig.exe -cmd upgrade -inplace b2b -wait -force
 
1 Comment

Posted by on October 17, 2012 in administration, Sharepoint Server 2010

 

Tags: ,

How to delete SharePoint 2010 timer job definition?


  1. Navigate to Central Administration
  2. Then Operations > Timer Job definitions
  3. Find you timer job from the list and click to open the page
  4. Copy the JobId from URL eg: http://MyServer:123/_admin/JobEdit.aspx?JobId=XXX-XXX-XXX-XX)
  5. Copy to NotePad and replace the %2D characters by a dash “-“
  6. Then Open Sharepoint Powershell command window and use below command
    stsadm.exe -o deleteconfigurationobject -id <ObjectGUID> 

Volila!!

 
1 Comment

Posted by on September 12, 2012 in Sharepoint Server 2010, Tips & Tricks

 

Tags:

Error occurred in deployment step ‘Recycle IIS Application Pool’: Provider load failure


The Bug

When you try to deploy or retract a SharePoint 2010 solution from visual studio 10 you get below error message:
Error occurred in deployment step ‘Recycle IIS Application Pool’: Provider load failure

Solution

Restart the SharePoint 2010 User Code Host service resolved the issue. Try below powershell command.

restart-service SPUserCodeV4

 
Leave a comment

Posted by on August 14, 2012 in Bug, Error, Sharepoint Server 2010, Webpart

 

Tags: ,

Error : Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb.


Once you create Mysite web application or any other web application and try to open general settings you might face below error:
Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb.”

Solution:

 
1 Comment

Posted by on May 9, 2012 in Sharepoint Server 2010

 

Tags: ,

Sharepoint 2010 Content Deployment Error : Feature ‘XXXXX-XXXX-XXXX’ is Site-scoped, and cannot be added to the Web.


Error:

When you do content deployment of your custom portal in Sharepoint 2010 you might get following error:

Content deployment job ‘Remote import job for job with sourceID = XXX-XXX-XXX-XXX: Import in progressThe exception thrown was ‘System.InvalidOperationException’ : ‘Feature ‘XXX-XXX-XXX’ is Site-scoped, and cannot be added to the Web.’

Cause

This occurs if you delete or retract your custom solution without deactivating and uninstalling  the feature for each deployed scope.

Resolution

You need to cleanup your feature uninstallation. Always follow below steps to uninstall a feature

  • stsadm –o deactivatefeature –id a9efee03-12fc-46ca-acba-0ef1e0ae3171 -url http://site
  • stsadm –o uninstallfeature –id a9efee03-12fc-46ca-acba-0ef1e0ae3171
  • stsadm -o retractsolution -name CustomWebpart.wsp -immediate -url http://site
  • stsadm -o execadmsvcjobs
  • stsadm -o deletesolution -name CustomWebpart.wsp  

You need to do this for all your sites using the feature. Then try content deployment again.

 
2 Comments

Posted by on February 6, 2012 in Error, Sharepoint Server 2010

 

Tags: ,