Skip to main content

Posts

Showing posts from 2014

SharePoint 2013 CSOM Error : Custom Login Page (Forms Based / Mixed mode authentication)

If you have a SharePoint On Premise installation with a Custom Login Page , you might encounter issues working with CSOM. The error would be primarily related to Authentication Failure. The following solution worked for me. Step 1 : The Custom Login Page should be placed in IIS Virtual Directory. As a general practise the custom login page is normally placed in the 15 Hive Layouts folder. Move/Copy the ASPX file of your custom login page from the 15 hive layouts folder to  the following folder in IIS Virtual directory of the concerned Web Application: “C:inetpubwwwrootwssVirtualDirectories<yoursite>_forms” Step 2 : Edit the Custom Login page file to make sure the master page url is correct. After the movement of the ASPX file, open the file in a notepad and check for the  MasterPageFile  value and change it to the following  =”~/ _layouts / 15 / simple . master “. Step 3 : Change the Custom Login Page Url in Central Administration. Navigate to Central Admin and change the Url def

Simultaneously start multiple Sharepoint 2007 workflows using C# for a List

 Its known that we can start SharePoint 2007 workflows  programmatically .  Here is the code that loops through all items in a list and starts the workflow for each item: foreach(SPListItem item in list.Items) { SPListItem wrkItem =list.GetItemById(item.ID); wrkflowmgr.StartWorkflow(wrkItem,wflassociation, wflassociation.AssociationData); } However the SharePoint Paradox here is that you can start only one workflow at a time , and have to wait for it to take its sweet time to finish, before you start the workflow for next item in list.  So what do you do if you have ( like i had ) a requirement to start a workflow on multiple items in a list simultaneously ?  Obviously you post a question shouting for help in  stackoverflow . I was told: there is no  simultaneous  method to start workflows for multiple list items at the same time. But  i eventually figured out, that  Multi Threading is the solution. Steps Create a Class “startWorkflow” that starts the workflow for a l