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

Telerik Grid Setting working with a web-site project but not with a web-application

1 Answer 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ahmed
Top achievements
Rank 1
Ahmed asked on 18 Apr 2019, 08:31 PM

I have a web-site project that I needed to convert to web-application. After I resolved all the compilation errors I hit a runtime exception in a piece of code I got from Telerik's Website.
In the part where I de-serialize the grid settings data I get an exception

System.ArgumentExceptionHResult=0x80070057Message=The serialized data is invalid.Source=BMS.WebAppInner Exception 1:SerializationException: Unable to find assembly 'App_Code.5gd62bdt, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

 

public static GridSettingsCollection LoadFromSerializedData(string data)

{

  LosFormatter formatter = new LosFormatter();

  // the line that throws the exception: formatter.Deserialize(data)

  return (GridSettingsCollection)formatter.Deserialize(data);

}

This works no problem when it was a Web-Site project. I am guessing assemblies that start with an App_Code.* usually means that it is compiling at runtime. I tried clearing all the ASP temp folders.

Any help is greatly appreciated. Thanks.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 23 Apr 2019, 08:18 AM
Hello Ahmed,

As stated at the top note in the mentioned article, I am afraid this approach is obsoleted and its implementation and maintenance is no longer supported. You can use RadPersistenceFramework instead:
https://demos.telerik.com/aspnet-ajax/controls/examples/integration/persisting-grid-settings/defaultcs.aspx?product=grid

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Ahmed
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or