Solved

Telerik Upgrade Issue

Posted on 2011-03-11
10
2,538 Views
Last Modified: 2012-05-11
We upgraded the ASP.Net Telerik Control from 2009.2.701.20 to 2010.3.1317.35

After upgradation, we get an error message only on some page, which were using RadGrid
Because those pages have this - http://www.telerik.com/help/aspnet/grid/grdsavingsettingsonperuserbasis.html

This is the error message - "'The serialized data is invalid'" - This error message is seen only when we debug in the error catch.
On IE we can see another Crash - "Could not load file or assembly 'Telerik.Web.UI, Version=2009.2.701.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
See the screenshot below
Telerik CrashI know crash occurs when older version of Telerik DLL is still refer somewhere.
We double check in web.config. Older version reference is not there.
(We done the upgradation using Telerik 'Upgrade Wizard' in Telerik Menu in Visual Studio. )


Also I understand, this error could happen when the older version of Telerik DLL is in any cache folder


After migration, we got this crash (Screenshot). But it got fixed when we done these steps.
I cleared the Temporary folder of ASP.Net, cleared Browser Temp Files, Deleted *.pdb files in bin folder

Now I believe the error shown (Screenshot) is because of the real error - "'The serialized data is invalid'"

Upgraded site is working with our testing database without any issue, while crashing only when we connect to development database. Difference is that the viewstate data length is lesser for testing database.
See this link
http://weblogs.asp.net/lduveau/archive/2007/04/17/viewstate-chunking-in-asp-net-2-0-maxpagestatefieldlength.aspx
We tried setting MaxPageStateFieldLength in web.config - same error.

Any thoughts ?

Raj
0
Comment
Question by:Rajkumar Gs
  • 6
  • 4
10 Comments
 
LVL 18

Expert Comment

by:Gary Davis
ID: 35115939
Check the bin folder and references to make sure you don'thave any remnants of the old Telerik dll(s). Try a Rebuild of the solution (instead of Build).

Gary Davis
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35116013
Thanks Gary for the suggestion

We have no Rebuild option available - Only these options
Build Options available
As I already mentioned, there is different error and strange scenario.

Any thoughts ?
Raj
0
 
LVL 18

Expert Comment

by:Gary Davis
ID: 35116236
I would attack the "Could not load assembly" error first. Perhaps remove and re-add the Telerik reference.Somehow, it is seeing the 2009 version somewhere. Perhaps the GAC?

Sometimes, clearing out the Visual Studio temporary files folder(s) will help.

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files

(Adjust the drive and framework folder as necessary)

Also, consider using Telerik's support or forums - their support is pretty good and the forums are a good source of answers.
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35116558
Thanks again Gary

We tried almost the things that we know
Tried re-add the Telerik reference
Searched entire source code for 2009
Cleared Visual Studio Temporary folder

Posted a question in Telerik forum yesterday - waiting for the response

If it is reference issue - why it is working perfectly when connects to testing databse. Only crashes when connects to development database. Did you notice the error message, I posted in my question. I believe the view state value is causing this issue.

Any more thoughts ?
Raj
0
 
LVL 18

Assisted Solution

by:Gary Davis
Gary Davis earned 150 total points
ID: 35117399
Well it is possible the data being serialized for ViewState for the Telerik grid is partially not serializable for some reason. Try a search like this: viewstate "serialized data is invalid" telerik grid.

It may be the data veing returned is different between the two databases and that is the issue rather than the database itself.

Some people like to look at the contents of the decoded ViewState using a tool but in the past, I have not found this too useful.

Hopefully, the Telerik folks can help since it is their control that is responsible for the ViewState.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35117418
Thanks Gary

Anyway hope the reply from Telerik will solve this issue

Raj
0
 
LVL 23

Accepted Solution

by:
Rajkumar Gs earned 0 total points
ID: 35148734
I got this response from telerik . Trying - I think very hard to get this issue resolved
The current implementation of the GridSettingsPersister does not support deserializing data that is serialized from a previous version of the assembly in which the GridSettingsPersister is defined. The problem is in the binary serialization, in particular. In the RadGrid Persisting Grid Settings on a Per-User Basis demo, you can note the GridSettingsCollection class implemented in the GridSettingsPersister.cs source code file. Objects of that class are the data that is actually getting serialized and deserialized. The LosFormatter that is used to serialize and deserialize this object uses binary serialization internally. Under default settings, binary serialization uses the full assembly name when identifying the full name of the class to which the serialized/deserialized object belongs. When you rebuild your project (or the assembly in which the GridSettingsCollection class is defined), the full name of the class (that includes also the assembly version) may change. At this point binary serialization will fail, expecting to find an assembly matching the same name and version as the assembly which the original object was serialized from.


This issue is a limitation (or requirement) of binary serialization in particular. It is not directly related to the GridSettingsPersister, which is centered around extracting persisted settings from a RadGrid instance. The GridSettingsPersister behavior won't change if you implement another means of serializing and deserializing your saved grid settings (an object of type GridSettingsCollection). In this respect, serialization is detached from the persister behavior. It is easily customizable by providing your own implementation for the methods of the GridSettingsCollection class and you can implement your own serialization mechanism based on your needs (if binary serialization may not be suitable for your case).


In fact, binary serialization can work for you, if you choose to use the BinaryFormatter (instead of the LosFormatter provided by default) and set the AssemblyFormat property to Simple. With this setting, assembly names of serialized and deserialized objects are not required to match exactly and you will not get the exception you are getting. The only requirement for this option is for your application to run in full trust. Medium trust environments do not allow binary serialization with simple assembly resolution and you cannot use this approach in shared hosting environments.

Regards
Raj
0
 
LVL 18

Expert Comment

by:Gary Davis
ID: 35166517
Note that Telerk has posted their latest updates a few days ago (Q1 2011).
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35170482
Even with latest version of Telerik, we need to fix the ViewState issue as Telerik mentioned, I hope

Anyway we will try for this, in our next phase

Thanks Gary
Raj
0
 
LVL 23

Author Closing Comment

by:Rajkumar Gs
ID: 35196582
I postponed Telerik Upgradation, since it need some RnD work we have not much time in this release.

Anyway suggestion from Telerik is valid and may help some others

Raj
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Where to begin studying? 5 63
Create XML 5 31
Convert to Hour/minute textbox and compare 3 35
COnsume rest client 6 8
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now