COMMUNITY

Home Forum Blog Market Events Resources
Contributor
RuiMartinho
Posts: 48
Registered: ‎06-04-2007

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

[ Edited ]

 Hi,

Error given when we set a DateTime on a ProcessInstance variable : "Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. Parameter name: ticks"

 Applications (given for reference, plays no part in error):

WebSite (ASP.Net Framework.Net 3.5) which calls WCF service (Framework.Net 3.5 through tcp Channel) hosted on a Windows Service which calls Asmx WebService (Framework.Net 2.0 through basicHttpBinding (on the client side)) hosted on IIS 6.0 Which instanciates K2ROM and sets the variables  

Variable Set operation : oProcessInstance.DataFields["Variable"].Value = Convert.ToDateTime(DateTime.Now);

Operating Services on servers (all) : Windows Server 2003 SP1

We have another web site in the same Server with k2rom and datetime process instance variables working fine. 

 

Thanks,

Rui

Please use plain text.
Contributor
Gail
Posts: 51
Registered: ‎02-26-2008

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

[ Edited ]

The first thing that jumps out at me, based on your description, is that the website that calls the WCF service (as well as the WCF service itself) are using .NET Framework 3.5.

As far as I know, K2 is not compatible with .NET Framework 3.5.

Please use plain text.
Contributor
RuiMartinho
Posts: 48
Registered: ‎06-04-2007

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

[ Edited ]

Hi Gail,

All K2Rom interaction is done with a .NET Framework 2.0 web service.

Please use plain text.
Contributor
Gail
Posts: 51
Registered: ‎02-26-2008

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

[ Edited ]

Rui -
I did some digging for you.  First of all, there is apparently an issue with data type compatibility problems between .NET 1.1 and .NET 2.0 and it is detailed here on Microsoft’s support site:
 http://support.microsoft.com/default.aspx/KB/907262

This "ticks" error has also been seen in K2.net 2003 upgrades from SP2a or SP3 to SP4.  In those cases, it was solved by:
1. copying all assemblies from the server’s bin folder to the developer workstations, or
2. removing the k2rom from the GAC, then adding back the k2rom.dll out of the k2 install \ bin folder back to the GAC.

A third possibility is:
There is a problem with the Visual Studio 2005 Add-Ins that gets installed in the HP.BizProcFRMK.msi package. It seems that a number of .Net Framework files are changed to older versions that are incompatible with K2.net 2003.

HTH

Please use plain text.
Contributor
RuiMartinho
Posts: 48
Registered: ‎06-04-2007

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

[ Edited ]

Hi Gail,

It's working!

The assemblies in the server’s bin folder were different from the developer workstation.

Thanks a lot for your help!

Please use plain text.