473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Dataview is not serializable

Unable to serialize the session state. Please note that non-serializable
objects or MarshalByRef objects are not permitted when session state mode is
'StateServer' or 'SQLServer'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Unable to serialize the session
state. Please note that non-serializable objects or MarshalByRef objects are
not permitted when session state mode is 'StateServer' or 'SQLServer'.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:
Hi,

I am getting the error when i do SessionState SQlserver inn web.config

[SerializationException: The type System.Data.DataView in Assembly
System.Data, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 is not marked as serializable.]

System.Runtime.Serialization.FormatterServices.Int ernalGetSerializableMember
s(RuntimeType type, Boolean excludeNonSerializable) +868

System.Runtime.Serialization.FormatterServices.Get SerializableMembers(Type
type, StreamingContext context) +300

System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.InitMemberInf
o() +103

System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.InitSerialize
(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter) +493

System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.Serialize(Obj
ect obj, ISurrogateSelector surrogateSelector, StreamingContext context,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter) +48

System.Runtime.Serialization.Formatters.Binary.Obj ectWriter.Write(WriteObjec
tInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) +515

System.Runtime.Serialization.Formatters.Binary.Obj ectWriter.Serialize(Object
graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +738

System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Serialize(Str
eam serializationStream, Object graph, Header[] headers, Boolean fCheck)
+136

System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Serialize(Str
eam serializationStream, Object graph) +13
System.Web.Util.AltSerialization.WriteValueToStrea m(Object value,
BinaryWriter writer)

[HttpException (0x80004005): Unable to serialize the session state. Please
note that non-serializable objects or MarshalByRef objects are not permitted
when session state mode is 'StateServer' or 'SQLServer'.]
System.Web.Util.AltSerialization.WriteValueToStrea m(Object value,
BinaryWriter writer)
System.Web.SessionState.SessionDictionary.Serializ e(BinaryWriter writer)
System.Web.SessionState.StateClientManager.Seriali ze(SessionStateItem
item, Stream stream)

System.Web.SessionState.SqlStateClientManager.Syst em.Web.SessionState.IState
ClientManager.Set(String id, SessionStateItem item, Boolean inStorage)
System.Web.SessionState.SessionStateModule.OnRelea seState(Object source,
EventArgs eventArgs)
System.Web.SessionState.SessionStateModule.OnEndRe quest(Object source,
EventArgs eventArgs)

System.Web.SyncEventExecutionStep.System.Web.HttpA pplication+IExecutionStep.
Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)
Nov 17 '05 #1
3 11434
Raghavendra,

What do you want to serialize from a dataview, it holds no data, it is a
view on a datatable.

Cor
Nov 17 '05 #2
Hi,

my dataview its acting like property within a class which is serailized by
using [Serializable]

public virtual DataView DataView
{
get
{
DataView t_DataView = m_DataTable.DefaultView;
if(m_Sort!=null)
{
t_DataView.Sort = this.m_Sort.SortExpression;
}
return t_DataView ;
}
set
{
m_DataTable = value.Table;
}
}

"Cor Ligthert" <no************@planet.nl> wrote in message
news:Og**************@TK2MSFTNGP15.phx.gbl...
Raghavendra,

What do you want to serialize from a dataview, it holds no data, it is a
view on a datatable.

Cor

Nov 17 '05 #3
Cor

i get the error
[SerializationException: The type System.Data.DataView in Assembly
System.Data, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 is not marked as serializable.]
Raghavendra
"Cor Ligthert" <no************@planet.nl> wrote in message
news:Og**************@TK2MSFTNGP15.phx.gbl...
Raghavendra,

What do you want to serialize from a dataview, it holds no data, it is a
view on a datatable.

Cor

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Prasad Patil | last post by:
hi, I have a three tier application, I have a method in the datalayer which should either return a (dataset or dataview or datrow), i need to know which should be the best possible option, are...
0
by: xmail123 | last post by:
Hi, Hi, As was pointed out whatever you return from a WebMethod needs to be serializable to SOAP. An ArrayList is not serializable. I will be needing to return other data types from web...
8
by: xmail123 | last post by:
Hi, As was pointed out whatever you return from a WebMethod needs to be serializable to SOAP. An ArrayList is not serializable. I will be needing to return other data types from web methods. ...
2
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit...
1
by: uni | last post by:
Hi, If I use session state mode=InProc, my session variable for the dataview object is working fine, but if I change the mode to StateServer, I got the error message saying: The type...
5
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it...
9
by: Developer | last post by:
Hi, How can one tell wsdl.exe/VS.NET web service proxy generatioon to to put on imported classes? For example, i fin your web service you use a class: class Data { }
3
by: Techno_Dex | last post by:
I'm wanting to create a Wrapper (or Extender depending on how you look at it) for a Serializable object that I then want to send over a webservice. Basically I want to create a Serializable Object,...
1
by: Ronald S. Cook | last post by:
Can I not pass DataView across .NET Remoting? Thanks, Ron
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.