Parser Error after Deploying Web Part

Jun 18, 2008 at 7:18 PM

Hi,

After installing and deploying the web part (Advanced WebParts 0.9.2) I get a Parser Error when I try to load my SharePoint site. The details are listed below:

 

 

Server Error in '/' Application.

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: This page has encountered a critical error. Contact your system administrator if this problem persists.

Source Error:

Line 1: <%@ Page Inherits="Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> <%@ Reference VirtualPath="~TemplatePageUrl" %> <%@ Reference VirtualPath="~masterurl/custom.master" %>Line 2:  <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>
Line 3:  <!--[if gte mso 9]><xml>

Source File: /Pages/Default.aspx    Line: 1

 


Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832


The only way I can access my site is to Retract the Solution

The version is SharePoint 2007 sp1.

<!-- [WebPartPageUserException]: This page has encountered a critical error. Contact your system administrator if this problem persists. at Microsoft.SharePoint.ApplicationRuntime.SafeControls.RethrowExceptionIfNeeded() at Microsoft.SharePoint.ApplicationRuntime.SafeControls.IsSafeControl(Type type, String& unsafeErrorMessage) at Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter.AllowBaseType(Type baseType) at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) [Exception]: This page has encountered a critical error. Contact your system administrator if this problem persists. at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) at System.Web.UI.PageParser.PostProcessMainDirectiveAttributes(IDictionary parseData) at System.Web.UI.TemplateParser.ProcessMainDirective(IDictionary mainDirective) at System.Web.UI.TemplateControlParser.ProcessMainDirective(IDictionary mainDirective) at System.Web.UI.PageParser.ProcessMainDirective(IDictionary mainDirective) at System.Web.UI.TemplateParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) [Exception]: This page has encountered a critical error. Contact your system administrator if this problem persists. at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) [HttpParseException]: This page has encountered a critical error. Contact your system administrator if this problem persists. at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->

 

Coordinator
Jun 18, 2008 at 8:20 PM
Hello,

Do you have ASP .NET AJAX configured properly? Also try enable more detailed error messages, instructions in this blog post:

http://wcornwill.wordpress.com/2007/03/16/sharepoint-error-handling-crank-up-the-volume/

Jun 18, 2008 at 10:53 PM

Hi,

How does ASP .NET AJAX need to be configured?  I already have detailed error handling enable.

Any other suggestions?

Jun 18, 2008 at 11:16 PM

I did find this error information in the event log on the SharePoint Server:

Event code: 3006
Event message: A parser error has occurred.
Event time: 6/18/2008 4:02:50 PM
Event time (UTC): 6/18/2008 11:02:50 PM
Event ID: 26f23eea9ee646d5bff1f96e4a7300b6
Event sequence: 3
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1165918549/Root-1-128583037407499772
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\Inetpub\wwwroot\wss\VirtualDirectories\80\
    Machine name: MachineName
 
Process information:
    Process ID: 8176
    Process name: w3wp.exe
    Account name: DOMAIN\sharepointaccount
 
Exception information:
    Exception type: HttpParseException
    Exception message: This page has encountered a critical error. Contact your system administrator if this problem persists.
 
Request information:
    Request URL: http://MachineName/Pages/Default.aspx
    Request path: /Pages/Default.aspx
    User host address:
    User: 
    Is authenticated: True
    Authentication Type: NTLM
    Thread account name: DOMAIN\sharepointaccount
 
Thread information:
    Thread ID: 1
    Thread account name: DOMAIN\sharepointaccount
    Is impersonating: True
    Stack trace:    at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
   at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)
   at System.Web.UI.TemplateParser.ParseInternal()
   at System.Web.UI.TemplateParser.Parse()
   at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
   at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
   at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
   at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Coordinator
Jun 19, 2008 at 7:15 AM
In general, I have plans to implement better error handling. Web parts shouldn't crash like this. :)

I am pretty sure this is because AJAX handler is missing. I haven't seen this before but in stack trace there is this: "at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()"

Does this happen with all web parts or only with Accordian & Rating?

Some tips in AJAX configuring:

>Check out this post: http://blogs.msdn.com/sharepoint/archive/2007/03/02/integrating-asp-net-ajax-with-sharepoint.aspx
>Steps 1-7 under "Extending SharePoint web.config files with Microsoft ASP.NET AJAX 1.0" topic.
>After completing steps in blog post above, you need to change assembly version numbers from 1.0.61025.0 to 3.5.0.0.
>There is also solution here in CodePlex that does this automatically. However, I don't have experience of it.
>http://www.codeplex.com/ajaxifymoss

Good luck! :)

-M
Jun 19, 2008 at 9:38 PM
This error  occurs after I deploy the solution from Solution Manager. It locks me out of any site with the above error, so I am unable to use any web parts. 
Thanks for the link regarding configuring AJAX, but after going through the step by step and trying the auto configuration I get the same errors.

Thanks,

David
Coordinator
Jun 20, 2008 at 10:15 AM
Can you install the webparts solution to some other server instance? Like if you have some virtual environment with MOSS installed and nothing else.

Also check if your web.config has the assembly in SafeControls list. The solution installation should do this automatically, but in the first error message there is something about SafeControls.

I hope we get this solved. :)
Jun 21, 2008 at 12:33 AM
I don't see the Webpart listed in SafeControls. Could you post  the line so I can add it manually.

Thanks
Coordinator
Jun 21, 2008 at 11:41 AM
Here you go:

<SafeControl Assembly="CodePlex.WebParts, Version=0.9.2.0, Culture=neutral, PublicKeyToken=a8975c53d715f889" Namespace="CodePlex.WebParts" TypeName="*" Safe="True" />
Jun 21, 2008 at 10:14 PM
The reason the Asssembly was not listed in the SafeControls section is the Solutions was not deployed in Solutions Manager. After deployment it configures SafeControls.
I did fine the solution to the Parser Error issue. I did not upgrade my .NET Framework to version 3.5 :-( . After upgrading I as able the deploy the solutions and add the new
webparts to the Webpart Gallery, but now I get errors when trying to preview the AccordionNaviWebpart, and the RatingWebpart. I will post the errors in a new post.

Thanks for your help,

David