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

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>
0
DavidChristiansen
8/24/2006 12:35:25 PM
asp.net.vs-web-deploy-projects 789 articles. 0 followers. Follow

4 Replies
1555 Views

Similar Articles

[PageSpeed] 48

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>
0
DavidChristiansen
8/24/2006 3:29:30 PM
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>
0
DavidChristiansen
8/24/2006 3:31:31 PM
Found any solution yet?
0
ltjelle
9/20/2006 8:58:12 AM
Here is the solution: http://support.microsoft.com/kb/924731
Wormhole is the God divided by Zero
0
AlphaOmega
11/7/2008 8:22:27 AM
Reply:

Similar Artilces:

Error 1 The type 'System.Web.UI.WebControls.LinqDataSource' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\asse
Once I build project. I encounter this error. Does someone experience this error?Error    1    The type 'System.Web.UI.WebControls.LinqDataSource' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.6.0.0__31bf3856ad364e35\System.Web.Extensions.dll'    D:\Source Code\Linq_Lesson5\Default.aspx    1    1    D:\Source Code\Linq_Lesson5\  It appears tha...

ASPNET2 HELP! CS0266: Cannot implicitly convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.FileUpload'.
Server Error in '/start-movieposters' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0266: Cannot implicitly convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.FileUpload'. An explicit conversion exists (are you missing a cast?) Source Error: ...

Value of type 'System.Web.UI.Control' cannot be converted to 'System.Web.SiteMap'.
 Hello,         I receive this error "System.Web.UI.Control' cannot be converted to 'System.Web.SiteMap" when I try to find the Sitemap control.  ...            <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />            <asp:ListView ID="ListView1" runat="server">            <LayoutTemplate>    ...

Error: Cannot convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.ButtonField'
Hello, I am getting the following error during compiliation. Any suggestions to fix it. Thanks. Cannot convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.ButtonField' protected void gvEvents_RowCommand(Object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Select") { int index = Convert.ToInt32(e.CommandArgument); GridViewRow selectedRow = gvEvents.Rows[index]; string sID; ButtonField btn; if (selectedRow.RowType == DataControlRowType.DataRow) { sID = ((ButtonField)selectedRow.FindControl("ID")).DataTextFi...

Error Serializing Value 'System.Web.UI.WebCOntrols.TreeNode' of type 'System.Web.UI.WebCOntrols.TreeNode'
Hi, I am  getting the error stated in the subject when i am storing a TreeNode in a ViewState and then using it as follows if (ViewState["ProductCounty"]!=null) { TreeNode _productCountyNode = DataTree.FindNode(((TreeNode)ViewState["ProductCounty"]).ValuePath); _productCountyNode.Expand(); } what could be causing this error? Hi, I believe TreeNode isn't serializable in a way its required for objects which can be put to ViewState - as reference - (TreeNode implements IStateManager and is meant to work together with TreeView itself saving it...

Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
on my localhost, everything is working just fine, developing a few hours... then i publish to another server (windows server 2003)...and suddenly my website is broken. i could track i down to a scriptreference in my scriptmanager - which used to work perfectly.now i don't know where it went wrong - because i developed several things, including the addition of autocomplete textbox with the control toolkitbut even after removing all the code for the autocomplete textbox, the problem wasn't solved. i seem to be the first one to have this problem, because google doesn't return anythi...

Could not load type 'System.Web.UI.Compatibility.CompareValidator' from assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
 Hello everyone.i m facing Required field validators problem  with ajax.Validators works fine in my application when it runs  frm localhostBut when I deployed the application on server it stops working.the thing i was missing  <tagMapping> tag.  <tagMapping>        <add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="System.Web.UI.Compatibility.CompareValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>   &n...

Error 92 Could not load type 'System.Web.Hosting.HostingEnvironment' from assembly 'System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
helloi'm a new  web developer i am trying to upgrad an esisting project fron visual studio 2003 to visual studio 2005 when trying to run the project i got that errorError    92    Could not load type 'System.Web.Hosting.HostingEnvironment' from assembly 'System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.        so ....any idea?  Hi tamer, It looks like Visual Studio 2005 is still trying to load the class in the 1.0 version of assemblies. Could you try removing the...

Compiler Error Message: CS0118: 'System.Web.Caching.Cache' is a 'type' but is used like a 'variable'
What am I missing??????????using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using com.amazon.webservices; using System.Web.Caching; /// <summary> /// Summary description for AmazonWS /// </summary> public class AmazonWS { public AmazonWS() { } public static DataSet AmazonToDataSet(string powersearchstring) { DataSet ds; //is it in the cache? if (Cache[powersearchstring] == null) { //create our query ItemSearchResponse response ...

Problem with AjaxControl kit error Compiler Error Message: CS0433: The type 'System.Web.UI.ScriptManager' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364
I'm trying to use the Tabs from the Ajaxcontrol kit.I have installed Ajax WebExtension 1.0 to the server i'm runnig the apps fromI'm sure the version of my Ajaxcontrol kit and the System.Web.Extensions i'm trying to use is 1.0.61025. But it seems the one on 3.5 is also there since the server has been updated to v3.5 .net framework I get this error below:  Compiler Error Message: CS0433: The type 'System.Web.UI.ScriptManager' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll...

Error 92 Could not load type 'System.Web.Hosting.HostingEnvironment' from assembly 'System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. #2
hello :i am tying to upgrad an existing project from visual studio 2003 to visual studio 2005and i get the following errorrError    92    Could not load type 'System.Web.Hosting.HostingEnvironment' from assembly 'System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.        so does any one have any idea about the reason for it and how to fix it?  Hi, Please look at another of thread for more details: http://forums.asp.net/p/1210076/2139042.aspx#2139042Zhao Ji MaSincerely,Microsoft...

Could not load type 'System.Web.UI.Compatibility.CompareValidator' from assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. (E:\SES3\Frontend\SESWe
After installingthe new Ajax release, I cannot compile my project. I tryied removing the <tagMapping>from the web.config, and was able to compile the project, BUT I go error on page: sys.argumentundefinedexception: value cannot be undefined. parameter name  Regards, Adina There is a known problem with the validators with the RTM.  More info about it here. I was getting the "Could not load type 'System.Web.UI.Compatibility.CompareValidator' from assembly 'System.Web.Extensions.." error too!  My project finally compiled correctly after removing the <tagMapping&g...

Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions
 I can't get rid of this error during runtime Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1705: Assembly 'MvcValidatorToolkit, Version=1.0.0.30828, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken...

The type name 'XmlDocument' does not exist in the type 'System.Web.UI.WebControls.Xml'
Hi Guys,  I am trying to convert a desktop app i wrote in VB to a web app written using C# .Net. The program checks XML entered against a XML schema and validates it. I have used the below code to validate the XML but am receiving the error in the title of this thread: {Xml.XmlDocument xmlDoc = new Xml.XmlDocument();  try{  xmlDoc.LoadXml(TextBox1.Text);}  catch (Exception ex){  TextBox2.Text = (ex.Message);  return;}} Why would this error be occuring? I have the below at the top of my aspx.cs page: using System;using System.Drawing;using System.Data;usin...

Operator '&' is not defined for types 'String' and 'System.Web.UI.WebControls.TextBox'
Can anyone tell me what this error message means, and what to do to correct it.  Here is the code that has the error:  Dim sql As Stringsql = "INSERT INTO tblConnecting (Date, Member, Name, Company, Phone, Fax, Address, NamesofAttendees, PaymentType, Email) " _ & "Values('" & Today() & "', '" & blnMember & "', '" & Me.txtName.Text & "', '" & Me.txtCompany.Text & "', '" _& Me.txtPhone.Text & "', '" & Me.txtFax.Text &...

Web resources about - Help Required - Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory' - asp.net.vs-web-deploy-projects

Resources last updated: 12/8/2015 6:34:30 AM