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

Last post 11-07-2008 3:22 AM by AlphaOmega. 4 replies.

Sort Posts:

  • Help Required - Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'

    08-24-2006, 8:35 AM
    Server Error in '/' Application.
    --------------------------------------------------------------------------------

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


    [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


    Running into a major issue with a project here that only works when first deployed to a server. Should the application shut down due to inactivity I receive this application error when a request comes in. This is happening all the time now and is not resolved by an iis restart or application pool recycle.

    I have done the usual Google search and come up with nothing.... can ANYONE offer any assistance - i am aware that this may not be specific to the web deployment project however I do use the web deployment project in this application and have not come across this fault in other applications where i dont use it.

    Please help...

    David.
    </DavidChristiansen>
  • Re: Help Required - Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'

    08-24-2006, 11:29 AM
    Further to my last email, here is some more information that was submitted to Microsoft in my Microsoft Support Case:

    1.                   Development Product and service pack(s) being used.

    a.        Microsoft Visual Studio 2005 (Team Edition for Software Developers)

    b.        Microsoft Visual Studio 2005 Web Application Projects (http://webproject.scottgu.com/ | http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/)  

    c.        Microsoft Visual Studio 2005 Web Deployment Projects (http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/)

    2.                   Operating System(s) and service pack(s) on which the problem occurs (client, server?).

    a.        Developer Workstation

                                                                   i.            Windows XP Professional (SP2) (5.1 build 2600_xpsp_sp2_gdr.050301-1519)

    b.        Server Platform

                                                                   i.            Windows 2003 Std / Windows 2003 Ent R2 (Both clean installs with only IIS / .NET Framework v2 installed)

    3.                   .Net framework version and service pack(s)(if relevant).

    a.        Framework 2.0

    4.                   Database version(s) and service pack(s)and technology used(if relevant).

    a.        Not relevant

    5.                   A detailed description of the problem.

    a.        Web Application falls over upon restarting of worker process – either manually or after idle timeout.

    Application operates as expected upon initial deployment until worker process is restarted. Fault also occurs on developer workstation configured with local IIS server set to host web application source directory.

    b.        Refer to attached document for specific error messages received.

                                                                   i.            6 a. Upon Worker process recycle

                                                                  ii.            6 b. Upon requesting non application root file during service failure from within same internet explorer browser window.

    6.                   Any error messages that you may be receiving (if relevant).

    a.        Server In ‘/’ Application - 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

    b.       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#" MasterPageFile="~/masters/_Root.Master" AutoEventWireup="true"
    Line 2:      Codebehind="Default.aspx.cs" Inherits="police.strathclyde.KnowledgeBank.UI.Web.projects.Default"
    Line 3:      Title="Untitled Page" %>


    Source File: /Projects/default.aspx    Line: 1

    7.                   Any source code that reproduces the problem (if relevant).

    a.       Only occurs within compiled code

    8.                    Details of workarounds attempted and there results (if relevant).

    The following do not produce any different results

    a.        Tried compilation and deployment on different developer workstations, one being a clean installation of VS with minimum required software to compile project.

    b.        Tried deployment to new (clean) windows server installations

    c.        Tried different compilations (debug/release)

    d.       Upon failure of application – PDB files are deleted from BIN directory on deployment server resulting in application services being restored – until the next recycle of the worker process, at which point the service is thereafter unrecoverable.

    e.        Redeploying application from Visual Studio over ‘broken’ deployment will restore service.

    f.         When application fails it is possible to copy deployed files from failing server to a new server and the application start as expected and will work until the recycling of the worker process as above.

    g.       Copying of an existing DLL from the bin directory, into the BIN directory upon service failure will restore service upon next request – until worker process is recycled.

    h.       No matter what we do – the service will fail at next worker process recycle.

    9.                   Details of any online Microsoft Knowledge Base articles used (if relevant).

    a.        Nothing available – hence logging call

    b.      Logged message on asp.net forums (http://forums.asp.net/thread/1379697.aspx)

    10.               Details of any Virus Checkers Installed.

    a.        Not relevant

    b.        Norton Antivirus (Corporate Edition)

    11.               Given the issue discussed above what would you consider a satisfactory resolution to this case?

    a.        Diagnosis of underlying fault

    b.        Knowledge transfer from Microsoft to <my company> employees of underlying fault and resolution

    c.        Affected web application service reinstated without further affects.


    </DavidChristiansen>
  • Re: Help Required - Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'

    08-24-2006, 11:31 AM
    Sorry that the above post looks awful, the formatting was not carried over and there is no way to edit a posting upon submission... (good huh?)
    </DavidChristiansen>
  • Re: Help Required - Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'

    09-20-2006, 4:58 AM
    • Member
      5 point Member
    • ltjelle
    • Member since 10-10-2005, 11:26 AM
    • Posts 1
    Found any solution yet?
  • Re: Help Required - Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'

    11-07-2008, 3:22 AM
    • Member
      86 point Member
    • AlphaOmega
    • Member since 09-13-2006, 3:22 AM
    • Russian Federation, Moscow
    • Posts 25
    Here is the solution: http://support.microsoft.com/kb/924731
    Wormhole is the God divided by Zero
Page 1 of 1 (5 items)