This is a migrated thread and some comments may be shown as answers.

ScriptManage Rendering Error

7 Answers 132 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Chuck Harrington
Top achievements
Rank 1
Chuck Harrington asked on 30 Apr 2010, 07:59 PM
I am getting an error Rendering Control with ScriptManager.  I recently added Q1 2010 upgrade to my VS 2010.
I put the ScriptManager in a Master Page now when I open any other aspx page I get the following
[A]Telerik.Web.UI.RadScriptManager cannot be cast to [B] Telerik.Web.UI.RadScriptManager.  Type A originates from Telerik.Web.UI, Version 2010.1.309.20, .....at location <local machine path>\Project Assemblies\venh7src01\Telerik.Web.UI.dll.  Type B originates from Telerik.Web.UI, Version 2010.1.309.35, .....at location <local machine path>\Project Assemblies\b1r6yiza01\telerik.web.ui.dll

 If I open the master page then open the aspx page I don't get the error but when i open just the aspx page I get the error.
Ok so now I see what the problem is but how do I fix it?  How did I do this? TIA

7 Answers, 1 is accepted

Sort by
0
Michael Fellmeth
Top achievements
Rank 1
answered on 21 Jul 2010, 11:41 PM
Exact same problem here.
0
Simon
Telerik team
answered on 27 Jul 2010, 01:05 PM
Hello guys,

Please make sure that all references to the Telerik.Web.UI assembly point to the same version as the error message says that there is a version mismatch - an attempt to cast from 2010.1.309.20 to 2010.1.309.35.

In any case it will surely help to delete the cached version of your Web Site (located in [X]:\Windows\Microsoft.NET\Framework\[v2.0.50727 or v4.0.30319]\Temporary ASP.NET Files).

I hope this helps.

Best wishes,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Michael Fellmeth
Top achievements
Rank 1
answered on 27 Jul 2010, 03:23 PM
Thank you, Simon. I deleted both 2.0 and 4.0 Temporary ASP.NET Files from the folders you pointed to, restarted VS 2010, and now the pages are rendering correctly in the designer.
0
Jing-Shing Hsu
Top achievements
Rank 1
answered on 29 Apr 2011, 07:37 PM
Hi,
I have the same problem and I followed the instruction to delete the cached version of problmed Web Site from both V2.0 and V4.0's Temporpary ASP.NET files.  Open the project in visual studio again, the problem "Error Rendering Control", [A]Telerik.Web.UI.RadScriptManager cannot be cast to [B], still exists.  And I noticed that after I open the solution, the cached solution is created under V4.0, not under V2.0.  
The virtual directory under localhost is .net 2.0.  My toolbox only has RadControls Asp.net 20. 
In Web.Config, I had

<

 

 

httpHandlers>

 

 

<

 

 

add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2010.2.713.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false"/>

 

 

</

 

 

httpHandlers>

 

<

 

 

pages>

 

 

<

 

 

controls>

 

 

<

 

 

add tagPrefix="telerik" assembly="Telerik.Web.UI" namespace="Telerik.Web.UI"/>

 

 

</

 

 

controls>

 

 

</

 

 

pages>

 

<

 

 

system.webServer>

 

 

<

 

 

validation validateIntegratedModeConfiguration="false"/>

 

 

<

 

 

handlers>

 

 

<

 

 

add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>

 

 

</

 

 

handlers>

 

 

</

 

 

system.webServer>

 

I commented out the telerik reference in system.webServer but made no difference.

Any idea where else could I have set this project to be .net 40 unknowly?  Thanks.
0
Simon
Telerik team
answered on 02 May 2011, 03:01 PM
Hello Jing-Shing,

The version of the ASP.NET framework your site is running under is configured in the project/website properties dialog.

As another measure of dealing with the problem, please also delete the cached project assemblies in this folder:
[system_drive_letter]:\Users\[username]\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies

I hope this helps.

Kind regards,
Simon
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
James
Top achievements
Rank 1
answered on 27 Oct 2012, 03:15 PM
I am having a similar problem to the one in this thread.  The confusing thing is that the message does not indicate a difference in versions numbers.  The message is as follows:
[A]Telerik.Web.UI.RadScriptManager cannot be cast to [B]Telerik.Web.UI.RadScriptManager.  Type A originates from 'Telerik.Web.UI, Version 2011.2.915.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' in the context 'LoadNeither' at location 'C:\Users\xxxxx\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\jbvnawzx01\Telerik.Web.UI.dll'.  Type B originates from 'Telerik.Web.UI, Version=2011.2.915.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' in the context 'LoadNeither' at location 'C:\Users\xxxxx\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\t0jbeogb01\telerik.web.ui.dll.

I tried deleting the cached locations as explained in this thread and as soon as I reopened VS the locations reappeared with the same message.  Please assist with this as soon as possbile.  Thanks

james
0
Genady Sergeev
Telerik team
answered on 31 Oct 2012, 09:44 AM
Hi Chuck,

Please try the following:

1) Remove all references to Telerik.Web.UI from your project
2) Place the Telerik.Web.UI.dll and Telerik.Web.Design.dll in the BIN folder of your app
3) Add references to them

I hope this helps.

Regards,
Genady Sergeev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ScriptManager and StyleSheetManager
Asked by
Chuck Harrington
Top achievements
Rank 1
Answers by
Michael Fellmeth
Top achievements
Rank 1
Simon
Telerik team
Jing-Shing Hsu
Top achievements
Rank 1
James
Top achievements
Rank 1
Genady Sergeev
Telerik team
Share this question
or