TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Harshal Thakre
1.5k
241
77.6k
Unable to serialize the session state using asyncfileupload.
Jan 12 2017 5:50 AM
Error:-
Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.
Note: I am using State Server mode. and trying to store Control in session:-
if (asyUpldOffer.HasFile)
{
string contentType = asyUpldOffer.ContentType;
if (contentType == "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || contentType == "application/pdf" || contentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" || contentType == "application/msword" || contentType == "image/jpeg" || contentType == "image/jpg")
{
Session["UploadOffer"] = asyUpldOffer;
}
else
{
Session["UploadOffer"] = null;
}
}
Reply
Answers (
1
)
review with star rating c#
Performance majorment