Showstopper parser/compilation issue

Last post 02-15-2007 11:47 AM by mkamoski. 3 replies.

Sort Posts:

  • Showstopper parser/compilation issue

    12-11-2006, 11:17 AM
    • Loading...
    • SWarren
    • Joined on 06-11-2002, 1:53 PM
    • Posts 6
    • ASPInsiders

    I'm seeing an unusual parser/compilation issue with an ASP.NET 2.0 application I need help with.  I've deployed a few commercial ASP.NET 2.0 apps already (including one really big one: ~1M visitors/day) but it's the first time I've seen this issue.  From my Google searches it appears this question has been asked before only once --here on these forums-- but not answered.  This bug is a showstopper for our current project; we can't deploy because of it.

    Once the application gets into the error state, I see one of these two error messages for all pages.  For simple .ASPX pages, the error is:

    Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'.

    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.InvalidCastException: Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'.

    Stack Trace:

    [InvalidCastException: Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'.]
    System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +123
    System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +54
    System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
    System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
    System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
    System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

    For pages with user controls, the issue manifests itself as a nonsense parser error:

    Parser Error Message: The file 'src' is not a valid here because it doesn't expose a type.

    Source Error:

    Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Profile.aspx.cs" Inherits="RDWeb.Profile" %>
    Line 2: 
    Line 3:  <%@ Register src="Controls/PostList.ascx" TagName="PostList" TagPrefix="rd" %>
    Line 4:  <%@ Register src="Controls/Expertise.ascx" TagName="Expertise" TagPrefix="rd" %>
    Line 5:  <%@ Register src="Controls/Activities.ascx" TagName="Activities" TagPrefix="rd" %>

    Source File: /profile.aspx    Line: 3


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

    The only way I've found to "reset" the web site is to replace the DLL file in \bin.  The usual means of app domain recycling (IISRESET, change web.config) do not clear this error.  Unfortunately the "fix" doesn't last long... the site returns to this state quickly, usually within an hour.

    Can anyone tell me what this issue is, and how to resolve it?

    thanks!
    Susan

     

  • Re: Showstopper parser/compilation issue

    12-11-2006, 11:42 AM
    • Loading...
    • SWarren
    • Joined on 06-11-2002, 1:53 PM
    • Posts 6
    • ASPInsiders
    I guess I should have added that we're using Web Application Projects and VS2005 -- that's why I have a \bin DLL to replace.  (We've used both of these before on our other ASP.NET 2.0 projects; the only additional tool for this project is Team System source control.)
  • Re: Showstopper parser/compilation issue

    12-11-2006, 5:09 PM
    Answer
    • Loading...
    • SWarren
    • Joined on 06-11-2002, 1:53 PM
    • Posts 6
    • ASPInsiders

    I'm going to answer my own question, courtesy of my co-worker Adrian Anttila.  This KB article answers the question (now if only Google would index it!): http://support.microsoft.com/kb/924731.  I don't have any satellite assemblies in my application, but I did have an assembly-level attribute setting the culture to "en-US".  Clearing the attribute cleared the problem.

     [assembly: AssemblyCulture("")]

  • Re: Showstopper parser/compilation issue

    02-15-2007, 11:47 AM
    SWarren:

    I'm going to answer my own question, courtesy of my co-worker Adrian Anttila.  This KB article answers the question (now if only Google would index it!): http://support.microsoft.com/kb/924731.  I don't have any satellite assemblies in my application, but I did have an assembly-level attribute setting the culture to "en-US".  Clearing the attribute cleared the problem.

     [assembly: AssemblyCulture("")]

    SWarren (and all) --

    That KB article did not help my situation.

    I am still getting the error.

    Do you have any other suggestions?

    Please advise.

    I have posted the details of my situation here...

    http://forums.asp.net/thread/1580602.aspx 

    ...so any help that you can be would be greatly appreciated.

    Thank you.

    -- Mark Kamoski

Page 1 of 1 (4 items)
Microsoft Communities
Page view counter