SharePoint / MOSS, ScriptManager and Pagemethods

The project I’m working on right now involves prototyping data mining and analysis tools and integrating them into the SharePoint / MOSS environment. These applications have code behind of course and relatively complex visual features involving AJAX, AJAX Control Toolkit, Javascript and jQuery.

During the process of migrating the first of these applications into SharePoint, I discovered that the ScriptManager tag was causing an “An unknown error has occurred” in SharePoint. The only odd thing was, that I have PageMethods enabled on the script manager tag. In this page I was using an Auto Complete Extender from the AJAX Control Toolkit and had configured it to point to a pagemethod.

There was nothing in the SharePoint logs, nor in the Event log so I disabled SharePoint error handling and found the following exception was being thrown. 

Server Error in ‘/’ Application.

Directory ‘C:\Inetpub\wwwroot\wss\VirtualDirectories\80\_catalogs\masterpage’ does not exist. Failed to start monitoring file changes.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Web.HttpException: Directory ‘C:\Inetpub\wwwroot\wss\VirtualDirectories\80\_catalogs\masterpage’ does not exist. Failed to start monitoring file changes.


After much trawling, I discovered this post by Chyke, it turns that this is a known issue on server with .NET 3.5 installed, even better there’s a hotfix for it here.

Update:  Having applied the hotfix, Ifound that the problem remained, my only option to fix my original problem at this point was to re-implement my pagemethod as a webservice. I was reluctant to do this at the outset because it seemed a waste to create a webservice just for a single (page) method. Nevertheless, I duly did so, reconfigured my Auto Complete Extender to point to the webservice and my problem was solved.

Published by

Phil Harding

SharePoint Consultant, Developer, Father, Husband and Climber.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.