So I have been meaning to write a blog entry for some time now and at last I have finally manage to drag together a few coherent sentences and get the ball rolling. So what topic have I picked to start my blogging experience with at Conchango? Well Sharepoint of course!
Anyway down to business and the reason for the post is that the other day I had to deal with an issue surrounding a timeout when activating a feature via the "ManageFeatures.aspx" page within the Windows Sharepoint Services (WSS) user interface. The feature itself was somewhat of a beast and did a lot of work within the "FeatureActivated" method behind the screens setting up lists, creating content etc which meant it was going to take a long time to complete. So a timeout issue?
Well as it turns out yes. The problem is that activating a feature via the "ManageFeatures.aspx" page means that the request to activate the feature is handled by asp.net and as such is subject to the same rules that govern any asp.net request, including maximum execution time out. For application pages that live within the layouts directory in the 12 hive such as "ManageFeatures.aspx" this timeout value can be changed by modifying the "web.config" at the root of the layouts directory. The actual value you need to change is the attribute called "executionTimeout" within the "httpRuntime" element. An example is shown below were the execution timeout has been changed to ten minutes.
<httpRuntime executionTimeout="600" />
Additional it is worth keeping in mind that this issue will not occur if have debug set to true within the compilation element of your sites "web.config" or you are installing and activating your features via "stsadm" at the command line and as such may not be identified until a site has been deployed into a environment that mirrors production.