I’ve got a little struct that I want to serialize in my ViewState. It looks something like this:
[Serializable]
private struct DayMoney
{
public readonly DateTime ValidFrom;
public readonly string CurrencyCode;
public readonly double Amount;
}
It serializes just fine, but when I perform a postback/callback, I get an exception for deserializing it. Wrapped in a long list of InnerException’s the root cause seems to be:
Unable to find assembly ‘BussinessTripModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’.
Which is kinda ridiculous, because that assembly is definately loaded in the current AppDomain.
WTF?
This kind of problems is very difficult to diagnose.
My suggestion is to use the Fusion Log Viewer to diagnose why your particular assembly is not found. Keep in mind that some specific options of Fuslogvw that are not so easy to setup, luckily google can help you a lot.
But, to start… make your structure public, as someone else said!!!