Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Answer
ASP.NET deserialization problem! Please HELP!
esong2
20y
1.9k
1
Reply
Hi, I've declare a ISerializable class and I'm able to serialize and deserialize it ONLY if I don't modify the aspx file again. If I simply re-save the aspx file (even if not modifying anything), I would get "Specified cast is not valid." error during deserialization. I suspect the problem is with "ClassToSerialize c=(ClassToSerialize)b.Deserialize(ms2)" but I do not have the solution. From the error it looks like casting problem but how come it worked the first time? Please help! Here is the full code and the database is MSSQL. <%@ Page Language="C#" EnableViewState="false" %> <%@ import Namespace="System.IO" %> <%@ import Namespace="System" %> <%@ import Namespace="System.Runtime.Serialization" %> <%@ import Namespace="System.Runtime.Serialization.Formatters.Binary" %> <%@ import Namespace="System.Data.SqlClient" %> <%@ import Namespace="System.Data" %>
Thanks. ES
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
population
asp.net with ADSI authentication problem