Monday, March 22, 2010

HttpModule Blocks SharePoint Designer Issue

A HttpModule is added to a SharePoint publishing site. Every thing works fine except that SharePoint designer is not able to open the SharePoint site. After tracing the html traffic, I noticed some communication patterns between SharePoint designer and the SharePoint site. So the workaround is to skip all HttpModule actions for those communications. Following code is added inside the HttpModule:
    if ( httpContext.Request.UserAgent.Contains("WebDAV") 
|| httpContext.Request.UserAgent.Contains("MS FrontPage")
|| httpContext.Request.Url.AbsoluteUri.Contains("_vti_"))
{
return;
}
Now SharePoint designer can open the site without any problem. But sometimes the check-out function inside SharePoint designer is disable for some reason. I can not figure out why that happens sometimes but not always.