Sunday, November 7, 2010

SharePoint 2010 Error: System.Web.HttpException: Directory 'C:\inetpub\wwwroot\wss\VirtualDirectories\80\_catalogs\masterpage' does not exist.

I had got the error when I tried to use pagemethods in SharePoint. I had registered the AjaxControlToolkit namespace in masterpage and then I replace ScriptManager with AjaxControlToolkit’s ToolkitScriptManager as shown below:

<ajaxToolkit:ToolkitScriptManager id="ScriptManager" runat="server" EnablePageMethods="true" EnablePartialRendering="true" EnableScriptGlobalization="false"   EnableScriptLocalization="true"/>

The problem was I enabled the pagemethods by setting EnablePageMethos to true. Disabling the pagemethods fixed the issue. However I didn’t explore why there’s the error if pagemethods is enabled.

So disable the pagemethods by setting EnablePageMethods=”false” and then then error will disappear…

3 comments:

  1. how to add these lines in sharepoint 2010 application pages or visual weparts. When i add these lines in application page It will give error like this :it can not accept more then one script manager because master page having script manager how to solve it pls tell

    ReplyDelete
  2. You need to remove or comment out the default script manager (similar like <asp:ScriptManager id="ScriptManager" ..) from the master page. You can get more information on how to use Ajax control toolkit in SharePoint from my another post: http://ranaictiu-technicalblog.blogspot.com/2010/08/ajax-control-toolkit-with-sharepoint.html

    ReplyDelete
  3. use scriptmangerproxy control when ever u need to use script manager in usercontrols or pages when you already defined scriptmanger in masterpage

    ReplyDelete