locked
ArgumentOutOfRangeException when running .Net 1.1 compiled code on .Net 2.0 RRS feed

  • Question

  • I want to use a .Net 1.1 compiled control/component from .Net 2.0 . 

    I added the <.Net 1.1 component> as a reference to my .Net 2.0 Project (on VS 2005 beta).  I am calling most of the object methods without a problem, but there is this one method that fails with the following exception:

    Exception: System.ArgumentOutOfRangeException
    Exception Message: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. Parameter name: ticks

    I found out that the failed method call (from the .Net 1.1 component) uses the .Net Binary Formatter class to send data to a remote server and that a DateTime paramter is send.

    It seems like the .Net 1.1 compiled code uses the .Net 2.0 Formatter or DateTime to send the parameter to the remote server.

    Question:  Is there a way to setup my project and specify that the specific referenced component be run on .Net 1.1 ?

    Note: 
     When running the "failed" method from a .Net 1.1 project this code is fine.  I don't want and at this stage can't go over to VS 2003.  Please help! Sad

    Wednesday, June 15, 2005 1:06 PM

Answers

  • This is likely a serialization issue with DateTime. There is a fix for this, but it takes installing some private data. Feel free to send me a message and I can look at how we can get you the fix and instructions Herman.

    Regards,
    Kit
    kitg@microsoft.com
    Wednesday, July 6, 2005 1:48 AM
  • The fix for this issue is available by calling Microsoft Product Support Services.

     

    Mention KB article number 907262 (note that the actual text of the KB article is not yet available outside of Microsoft, but the PSS engineer will be able to give you the patch.)

     

    Wednesday, March 15, 2006 10:02 PM

All replies

  • This is likely a serialization issue with DateTime. There is a fix for this, but it takes installing some private data. Feel free to send me a message and I can look at how we can get you the fix and instructions Herman.

    Regards,
    Kit
    kitg@microsoft.com
    Wednesday, July 6, 2005 1:48 AM
  • I got the same on a customer who install the 2.0 framework , but now it's uninstall and we have always the same error. The customer is on windows 2003 server and my apps is code with visual studio 2002 . Any idea?

    Thanks you.
    Friday, February 10, 2006 4:48 PM
  • The fix for this issue is available by calling Microsoft Product Support Services.

     

    Mention KB article number 907262 (note that the actual text of the KB article is not yet available outside of Microsoft, but the PSS engineer will be able to give you the patch.)

     

    Wednesday, March 15, 2006 10:02 PM