I'm working with a RadGrid contol. I messed up the DataField properties of its contained GridBoundColumns, and got an exception at runtime. But, because I'm running with SessionState set to 'StateServer', instead of to 'InProc', the exception I saw was about a serialization error:
I switched Session.mode to 'InProc', and quickly discovered the error:
But I shouldn't have had to do this. If GridException is ever put into the Session, it should be marked as Serializable.
We set SessionMode to 'StateServer' as a matter of course, on our development machines, for the specific purpose of revealing serialization errors during development.
Any web application of significance must be capable of running in a clustered environment. We need to ensure that our implementors have the option of using shared sessions when installing in a clustered environment. So we need to make sure we don't write our code in a way to make that impossible.
Might I suggest that your developers might consider doing the same? True, 'InProc' is what Microsoft's tools default to, but it's not a good default to develop against.
[SerializationException: Type 'Telerik.Web.UI.GridException' ... is not marked as serializable.] |
I switched Session.mode to 'InProc', and quickly discovered the error:
There was a problem extracting DataKeyValues from the DataSource. ... |
But I shouldn't have had to do this. If GridException is ever put into the Session, it should be marked as Serializable.
We set SessionMode to 'StateServer' as a matter of course, on our development machines, for the specific purpose of revealing serialization errors during development.
Any web application of significance must be capable of running in a clustered environment. We need to ensure that our implementors have the option of using shared sessions when installing in a clustered environment. So we need to make sure we don't write our code in a way to make that impossible.
Might I suggest that your developers might consider doing the same? True, 'InProc' is what Microsoft's tools default to, but it's not a good default to develop against.