Thursday, September 26, 2013

SharePoint slow to start up after application pool recycled

After deploy solution through visual studio the application pool will be recycled.
Then it is painful slow to start the first page.

There are a few articles talking about this,
http://blog.muhimbi.com/2009/04/new-approach-to-solve-sharepoints.html
http://ddkonline.blogspot.com.au/2010/05/fix-sharepoint-very-slow-to-start-after.html

I just execute the vb script below as the article discussed to add the registry settings, without reboot the server, and it worked much faster.

const HKEY_USERS = &H80000003
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = ""
objReg.EnumKey HKEY_USERS, strKeyPath, arrSubKeys
strKeyPath = "\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing"
For Each subkey In arrSubKeys    
objReg.SetDWORDValue HKEY_USERS, subkey & strKeyPath, "State", 146944
Next


How to use SharePoint workflow 2013 if this is not fixed.

I have been checking out the SharePoint workflow 2013, which gave many exciting new features and I am all up to try it in demo. Then I found this article here. It said if you develop a workflow in Visual studio 2012 and deploy it, then any later changes for the workflow will not get updated in the SharePoint. It seems that you can only develop the workflow once and if it is wrong, you can not update it, you need to start again for a new one. WTF.

https://connect.microsoft.com/VisualStudio/feedback/details/779905/sharepoint-2013-workflow-deployment-doenst-update-workflow-definition

Luckily, there is a fix as the workaround tab mentioned from the link above.
A vssphost5.exe process needs to be terminated before deploy.

And this link,
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8420797e-cb85-4949-9e0e-5060a9060c10/how-to-update-copy-of-sharepoint-2013-azure-workflow

And the official known workflow issues article is a must read.
http://office.microsoft.com/en-us/help/sharepoint-server-2013-known-issues-HA102919021.aspx#_SharePoint_Designer

Crate custom task form in SharePoint 2013 workflow

With the SharePoint 2013 workflow, the InfoPath based form is not used for task forms, instead custom aspx page will need to be created. This is actually a good move to give developers back the flexibility to extend it more.

The blow is so far the best article to teach how to do it.

http://sp2013.pro/2013/03/creating-spd-2013-workflows-part-23-implementing-custom-asp-net-task-form/#more-124