Tuesday, January 29, 2013

Increase list attachment size limit

For document library, to increase the maximum upload size, the following change should be sufficient:

Central Admin > Application Management > Web Application General Settings, select the web application, set the Maximum Upload Size to the new value then hit OK.

In order to upload attachment with size greater than 50 MB, in addition to changes above, we also need to modify the web.config file. In the web.config file, replace with

There are other factors to consider when adjusting the maximum upload size, such as disk space, site quota, execution timeout, etc.

Wednesday, January 16, 2013

User Profile between SharePoint and AD out of synch

There are many reasons that user profile information displayed in SharePoint may be out of synch with the information in AD. One such reason is name change because of marriage.

If the Account Name is changed, you can use the "stsadm -o migrateuser -oldlogin xxx\abc -newlogin xxx\xyz -ignoresidhistory" command to migrate the old user to the new user.

For display name change, deleting the user from the site collection user information list should fix the problem. You can access this hidden list by going to http://xxx/_catalogs/users/simple.aspx page.
To delete the user, go to: http://xxx/_layouts/userdisp.aspx?Force=True&ID=xyz make sure id is correct for the user, then click "Delete User from Site collection".
You may also want to delete the user from the user profile of the central 
administration too. 

This post from Todd Klindt explains above stsadm command really well. 

See also http://blogs.c5insight.com/Home/tabid/40/entryid/181/How-to-Remove-a-User-from-a-SharePoint-2010-Site-Collection.aspx on how to remove a user from a SharePoint 2010 site collection.
Here is the basic steps from above post:
  1. As a site collection administrator, click Site Actions –> Site Permissions
  2. Click into any existing group (like site Owners).  The URL will be something like http://server/_layouts/people.aspx?MembershipGroupID=28.
  3. Change the 28 to a 0.  The list should now show you All People. 
  4. Find the user, click the checkbox by their name.  Click Actions, Delete Users from Site Collection.
  5. Now add the user back to the appropriate group.
The following powershell commands may be handy too:

Set-SPUser -Identity ‘Domain\username’ -DisplayName ‘Last, First’ –Web http://SharePointSe rver*
This forces a manual sync of properties from AD

Set-SPUser -Identity ‘Domain\username’ –Web http://SharePointServer –SyncFromAD*

To force Sync of all users,
Get-SPUser –Web http://SharePointServer | Set-SPUser –SyncFromAD*

Thursday, January 10, 2013

Sharepoint Fault Handler in vs 2008

Please see  Sharepoint Fault Handler in vs 2008

Also below is a copy.

Fault Handler
To get more detailed information about this error, it is necessary to add a Fault Activity (equivalent of a catch block) and to log it.
Select the workflow in the (Visual Studio) Workflow Designer, click on the lower left side of the Designer and click on the Fault Handler:
Another view of the Workflow Designer will show up:
Drag and drop a FaultHandler activity from the Workflow Foundation toolbox into  fautlHandlersActivity1 :
In the property page of this last activity select the FaultType property by browsing the mscrolib assembly:
Select System.Exception:
Now we will log the StackTrace into the workflow history log: drag and drop a LogHistoryList activity into the handler (if you don’t find this activity drag and drop the microsoft.Sharepoint.WorkflowAction.dll assembly to a new Visual Studio toolbox tab) :
Select the logToHistoryListActivity1 and set its HistoryOutcome property to the stack trace value of faultHandlerActivity1:
Rebuild the solution , redeploy (install.bat) and test the workflow.
The trace will show up in the workflow status :