Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValu

198 views
Skip to first unread message

lmsa

unread,
Feb 3, 2006, 1:37:40 PM2/3/06
to
Hi

I just installed VS 2005 (and Framework 2.0) in my computer. I also have VS
2003 and Framework 1.1 installed.

My apps built with 1.1 are suddenly throwing exceptions in parts of the code
that were working fine until now. The exception is:

>>>>>>
Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks
Parameter name: ticks

Server stack trace: at System.DateTime..ctor(Int64 ticks) at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadDateTime()
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadValue(InternalPrimitiveTypeE
code) at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadMemberPrimitiveTyped()
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler
handler, __BinaryParser serParser, Boolean fCheck, IMethodCallMessage
methodCallMessage) at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler, Boolean fCheck,
IMethodCallMessage methodCallMessage) at
System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String
objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel
securityLevel) at
System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream
requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders,
Stream& responseStream) Exception rethrown at [0]: at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg) at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,
Int32 type) at
SINPEILIPlanillaRecBS.CPlanillaRecBS.InformeGeneralPorFecha(DateTime
FechaInicio, Object FechaFinal) at SINPE.US.Ili.InformeGeneral.Refrescar() in
F:\IngSoft\NET\Interfaz
Cliente\Servicios\ILI\SINPE.US.Ili\InformeGeneral.vb:line 143
>>>>>>

My code is something like that (client side):

>>>>>
Function getData as Collection
dim IniDate as Date
dim EndDate as Date
dim myRemoteObject as new MyComponent()
dim result as Collection

IniDate = Date.Now
EndDate = Date.Now

'This is the line that throws the exception
result = myRemoteObject.GetRemoteData(IniDate, EndDate)

return result
End Function
>>>>>

Does anybody has a workaround for this..?

Thanks a lot.

Dave Kolb

unread,
Feb 20, 2006, 8:08:51 PM2/20/06
to
I am having the same problem if I have a 1.1 client server application where
the 1.1 client is installed on a 2.0 only system remoting to a 1.1 server.

Has anyone confirmed this as an incompatibility with .Net Remoting?

Thanks,
Dave Kolb

"lmsa" <lm...@discussions.microsoft.com> wrote in message
news:EEEE1287-1877-4DAE...@microsoft.com...

Dave

unread,
Feb 22, 2006, 12:06:00 PM2/22/06
to
Per the Genuine Channels folks --> One of the reasons a 1.1 client using 2.0
cannot talk to a 1.1 server using 1.1: For DateTime in .NET 1.1 the data is
stored in "private long ticks;". In .NET 2.0 it is stored in "private ulong
dateData;". Variable names and their types are completely different. This
fact causes incompatibility in the serialization layer to appear during
interaction of applications running on different versions of .NET framework.

You can investigate the internal structure of the DateTime class using Lutz
Roeder's Reflector (http://www.aisto.com/roeder/dotnet/).

Seems rather amazing they did this and claim forward compatibility rather
than create a new type.

Hopefully they did not break ADO.Net serialization.

Dave


"Dave Kolb" <Dave...@sas.com> wrote in message
news:e5AGiNo...@TK2MSFTNGP11.phx.gbl...

0 new messages