Wednesday, March 28, 2012

AJAX Beta 2 - Could not load type Microsoft.Web.UI.UpdateProgress from assembly Microsoft.

Hi...

I'm experiencing a problem with the new AJAX Beta 2. When I try and put the UpdateProgess on a simple page, I get the below

Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

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.TypeLoadException: Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Source Error:

Line 13: </head>
Line 14: <body>
Line 15: <form id="form1" runat="server">
Line 16: <div>
Line 17:


Source File:C:\Inetpub\wwwroot\Auction\TEST.aspx Line:15

Stack Trace:

[TypeLoadException: Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
ASP.test_aspx.__BuildControlform1() in C:\Inetpub\wwwroot\Auction\TEST.aspx:15
ASP.test_aspx.__BuildControlTree(test_aspx __ctrl) in C:\Inetpub\wwwroot\Auction\TEST.aspx:1
ASP.test_aspx.FrameworkInitialize() in C:\Inetpub\wwwroot\Auction\TEST.aspx.vb:912307
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +40
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.test_aspx.ProcessRequest(HttpContext context) +29
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

For the below code

<%@dotnet.itags.org. Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %
<%@dotnet.itags.org. Register Assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="Microsoft.Web.UI" TagPrefix="asp" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdateProgress id="UpdateProgress1" runat="server">
<progresstemplate>
<IMG src="Template/loading.gif" /> Working ... <asp:Image id="LoadingImage" runat="server" ImageUrl="Template/loading.gif"></asp:Image>
</progresstemplate>
</asp:UpdateProgress>
<asp:UpdatePanel id="UpdatePanel1" runat="server">
</asp:UpdatePanel>
</div
</form>
</body>
</html>
Please can you help, this is driving me nuts...Wink

Thanks,
Clint

Clint,

Did you try to add the assemby reference to the web.config file? You don't need to register it in the page, and you don't need it in the BIN folder.
Also, it seems that your copy of the assembly is still Beta 1, have you uninstalled Beta 1 and, then, reinstalled Beta 2? That will install the correct assembly in the GAC.

Cheers,

Juan


Hi Juan, thanks for your help.

I've uninstalled the Beta 2 and reinstalled a fresh copy from the internet, and I've also deleted the files in the BIN directory and the reference in the .aspx page.
In addition, I've replaced my web.config with the one that is created from a new web project including AJAX (I've included it below) But I am still getting this error.

Server Error in '/Auction' Application.

Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

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.TypeLoadException: Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Source Error:

Line 8: </head>
Line 9: <body>
Line 10: <form id="form1" runat="server">
Line 11: <div>
Line 12: <asp:ScriptManager id="ScriptManager1" runat="server">


Source File:C:\Inetpub\wwwroot\Auction\Default2.aspx Line:10

Stack Trace:

[TypeLoadException: Could not load type 'Microsoft.Web.UI.UpdateProgress' from assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
ASP.default2_aspx.__BuildControlform1() in C:\Inetpub\wwwroot\Auction\Default2.aspx:10
ASP.default2_aspx.__BuildControlTree(default2_aspx __ctrl) in C:\Inetpub\wwwroot\Auction\Default2.aspx:1
ASP.default2_aspx.FrameworkInitialize() in C:\Inetpub\wwwroot\Auction\Default2.aspx.vb:912307
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +40
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default2_aspx.ProcessRequest(HttpContext context) +29
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Here is my code...

<%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdateProgress id="UpdateProgress1" runat="server">
<progresstemplate>
<IMG src="Template/loading.gif" /> Working ... <asp:Image id="LoadingImage" runat="server" ImageUrl="Template/loading.gif"></asp:Image>
</progresstemplate>
</asp:UpdateProgress>
<asp:UpdatePanel id="UpdatePanel1" runat="server">
</asp:UpdatePanel>
</div
</form>
</body>
</html>

And here is my new web.config

<configuration>
<configSections>
<sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="Microsoft.Web.Configuration.ScriptingSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="webServices" type="Microsoft.Web.Configuration.ScriptingWebServicesSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="Microsoft.Web.Configuration.ScriptingJsonSerializationSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="profileService" type="Microsoft.Web.Configuration.ScriptingProfileServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="authenticationService" type="Microsoft.Web.Configuration.ScriptingAuthenticationServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<connectionStrings>
<remove name="AuctionConnectionString"/>
<add name="AuctionConnectionString" connectionString="Data Source=ALEPPO;Initial Catalog=Auction;Persist Security Info=True;User ID=sa;Password=" providerName="System.Data.SqlClient"/>
<add name="SMSINTv2ConnectionString" connectionString="Data Source=ALEPPO;Initial Catalog=SMSINTv2;Persist Security Info=True;User ID=sa;Password=" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
<tagMapping>
<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CompareValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CustomValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RangeValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RegularExpressionValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RequiredFieldValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Microsoft.Web.UI.Compatibility.ValidationSummary, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</tagMapping>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
--><compilation debug="true">
<assemblies>
<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
</httpHandlers>
<httpModules>
<add name="WebResourceCompression" type="Microsoft.Web.Handlers.WebResourceCompressionModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptModule" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
<microsoft.web>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
-->
<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in Atlas applications, you need to add each property name to the setProperties and
getProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2" />
--></webServices>
</scripting>
</microsoft.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler"/>
</handlers>
</system.webServer>
</configuration>

Hi...

I've managed to fix it thanks ...

I tried creating a new project and copying the files across to it, and it worked!? Very Strange!?

Any Idea why this would be, even after I copied the entire now working project files back to the original folder that wasn't working, it still did not work??

Thanks for your help,
Clint


I don't know if this helps any or not, but I was originally getting the same error and this is how i resolved it:

*I should first mention I had Beta1 and the ValueAdd CTP implemented prior to Beta2. (I had implemented them simply by copying the Microsoft.Web.Extensions.dll and Microsoft.Web.Preview.dll to the app's Bin folder):

To implement Beta2 I followed the doc instructions (web.config modification), and deleted the 2 dll's from the Bin folder (and removed the web.config references to the ValueAdd piece).

That's when I started getting the same error you were.

UNTIL I restarted IIS. I'm guessing it (or ASP.NET) had the old dll's cached somewhere since I originally had them in the bin folder??

Hope it helps-

Kenneth


The assemblies are in the GAC, cached, etc. Restarting IIS as suggested below worked for me too.

No comments:

Post a Comment