Привет!

Пробовал подключиться к 2.1 нетовским провайдером 1.7 и свалилось на подключении в методе:

private void DatabaseInfo(byte[] items, byte[] buffer, int bufferLength)
{
  lock (this)
  {
    try
    {
// see src/remote/protocol.h for packet definition (p_info struct)
      this.Send.Write(IscCodes.op_info_database); // operation
      this.Send.Write(this.handle); // db_handle
      this.Send.Write(0); // incarnation
      this.Send.WriteBuffer(items, items.Length); // items
      this.Send.Write(bufferLength); // result buffer length

      this.Send.Flush();
      GdsResponse r = this.ReadGenericResponse();

      Buffer.BlockCopy(r.Data, 0, buffer, 0, bufferLength);
    }
    catch (IOException)
    {
      throw new IscException(IscCodes.isc_network_error);
    }
  }
}


на строке

Buffer.BlockCopy(r.Data, 0, buffer, 0, bufferLength);


с сообщением

Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.

Ответить