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.ArgumentException
HResult=0x80070057
Message=The serialized data is invalid.
Source=BMS.WebApp
Inner 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.