Parser Error

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/17/2008 1:39:53 PM
Gravatar
Total Posts 550

Parser Error

Hi All

When I run the mojoportal on my cumputer the following error apears and I have to remove EnablePageMethods="true" from Layout.Master in my skins.Thanks for your help.

 

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Type 'System.Web.UI.ScriptManager' does not have a public property named 'EnablePageMethods'.

Source Error:


Line 20: <asp:SiteMapDataSource ID="PageMapDataSource" runat="server" ShowStartingNode="false" />
Line 21: <asp:SiteMapDataSource ID="ChildPageSiteMapData" runat="server" ShowStartingNode="false" />
Line 22: <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
Line 23: <div id="wrapwebsite">
Line 24: <div id="wrapheader">


Source File: /mojo/App_MasterPages/layout.Master Line: 22

 

Thanks for help.

 

1/17/2008 1:54:43 PM
Gravatar
Total Posts 18439

Re: Parser Error

Hi A.Samarian,

That property is only available on the AJAX version of Script Manager so most likely you have something wrong in your Web.config.

In the Web.config, script manager is mapped to the MS AJAX (System.Web.Extensions.dll). Make sure your web.config has this:

<httpHandlers>
<!-- AJAX Extensions support -->
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add verb="GET,HEAD,POST" path="*.asbx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add verb="*" path="*CaptchaImage.ashx" type="Subkismet.Captcha.CaptchaImageHandler, Subkismet" />
<add verb="*" path="*.mml.ashx" type="mojoPortal.Web.Services.MathMLHandler, mojoPortal.Web" />

</httpHandlers>

<httpModules>

<!-- AJAX Extensions support -->
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</httpModules>

Make sure those things are not missing from your Web.config

Hope it helps,

Joe

1/17/2008 2:26:33 PM
Gravatar
Total Posts 550

Re: Parser Error

Hi Joe

I overwrite <httpHandlers>  <httpModules> node in web.config with your recommanded node,but previous error apears agains.

Thanks

 

1/17/2008 2:41:34 PM
Gravatar
Total Posts 18439

Re: Parser Error

I did not mean for you to overwrite but to add the missing parts. The httpmodule section I posted was incomplete, it just showed only the part relevant to this post.

If you're working from svn I recommend revert your Web.config file as svn trunk does not produce this error so you must not have everything you need in Web.config

Also make sure you have the System.Web.Extensions.dll in your bin folder

Make sure there is not another Web.config up one folder in the folder that corresponds to localhost

Make sure you don't have an old version of MS AJAX installed in the GAC. I would go install the newset one to make sure.

Make sure your app is configured for 2.0 .NET and not 1.1

Hope it helps,

Joe

1/17/2008 3:09:22 PM
Gravatar
Total Posts 550

Re: Parser Error

Hi Joe

I revert web.config to svn but my error not correct. So I remove EnablePageMethods="true"  from Layout.Master files.I check This problem later.

Thanks

2/18/2008 12:12:44 PM
Gravatar
Total Posts 550

Re: Parser Error

Hi

I changed version of System.Web.Extensions in web.config to 3.5.0.0 and copy System.Web.Extensions from

vs 2008 where is install on my computer but my problem not solve and the following error apears:

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The base class includes the field 'ScriptManager1', but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager).

Source Error:

Line 20: <asp:SiteMapDataSource ID="PageMapDataSource" runat="server" ShowStartingNode="false" /> Line 21: <asp:SiteMapDataSource ID="ChildPageSiteMapData" runat="server" ShowStartingNode="false" /> Line 22: <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" /> Line 23: <div id="wrapwebsite"> Line 24: <div id="wrapheader">


Source File: /Samar/App_MasterPages/layout.Master Line: 22

How I can get latest verion of System.Web.Extensions that ScriptManager have EnablePageMethods  propertiy and work on ASP.net 2 .

Thanks for helps

2/18/2008 12:37:21 PM
Gravatar
Total Posts 18439

Re: Parser Error

I think you have an old beta version of MS AJAX installed in your GAC and you need to uninstall it. Maybe using Control Panel > Add Remove Programs or System Administration > .NET Framework 2.0 Configuration.

Then if it still doesn't work install the newest version using the installer (not just copy files, run installer program so the new version goes into the GAC)

The problem is it will always use the one in the GAC instead of the one in the bin folder so you must uninstall the old version.

Helpful links:

MSDN reference to ScriptManager.EnablePageMethods

Scott Guthrie post about common gotchas mentions how the old version did not have EnablePageMethods property

ASP.NET forums post where user says uninstall and then re-install then restart IIS fixed it for him

Hope it helps,

Joe

2/18/2008 2:24:27 PM
Gravatar
Total Posts 550

Re: Parser Error

Hi Joe

Ok.I uninstall AJAX extention from my computer and problem solved.

Special thanks you.

You must sign in to post in the forums. This thread is closed to new posts.