Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Reply
Unable to serialize the session state using asyncfileupload.
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Harshal Thakre
7y
297
1
Reply
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;
}
}
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
review with star rating c#
Performance majorment