.NET Remoting

From: kmacintyre (kmacintyre_at_discussions.microsoft.com)
Date: 12/22/04

  • Next message: localhost: "Need Help With InitializeLifetimeService Strategy"
    Date: Wed, 22 Dec 2004 07:35:10 -0800
    
    

    I am using .NET Remoting to transfer a file over a network in the form of a
    byte array. I am registering the server using:
    TcpChannel chan = new TcpChannel(8085);
    ChannelServices.RegisterChannel(chan);
    RemotingConfiguration.RegisterWellKnownServiceType(typeof(HICONServer),
    "C4I.EDMSIM.HICON", WellKnownObjectMode.SingleCall);

    and calling the function using:
    byte[] buffer = _hiconServer.chooseStation(stationID);

    the chooseStation function returns the byte array:

    FileStream fs = new FileStream(_dsa.dbName, FileMode.Open);
    BinaryReader br = new BinaryReader(fs);
    buffer = br.ReadBytes((int)fs.Length);
    br.Close();
    return buffer;

    This works fine when the client and server are both on the same machine, and
    this method has worked in another application deployed in a large scale
    environment. For some reason, the function never returns. I have added
    trace information and the "return buffer" line is getting called, my network
    activity jumps and anywhere from 1MB to 4MB gets sent and then nothing
    happens.

    I have two questions:
    1. Should I being doing this another way (splitting up the byte array, and
    returning pieces at a time, this probably makes more sense, but I didn't
    have problems in the past).
    2. Is there some way I can tell if the remoting call has hung up.


  • Next message: localhost: "Need Help With InitializeLifetimeService Strategy"

    Relevant Pages

    • Re: TCPBEUI misbehaving
      ... >> I try to analyse problems on my network. ... The wrkheuristics parameter sets a variety of requester fine-tuning ... 9 buffer small read and write requests until the buffer is full ... 27 force correct open mode when creating files on a core server (reserved ...
      (comp.os.os2.setup.misc)
    • Re: .NET Remoting
      ... You should probably use a network packet sniffer to monitor the ... > the chooseStation function returns the byte array: ... > buffer = br.ReadBytesfs.Length); ...
      (microsoft.public.dotnet.distributed_apps)
    • Transfer Files Via Serial Port
      ... Currently doing some patching and the server and array are not yet ... connected to any network and can't be moved. ... card or CD.... ...
      (SunManagers)
    • Re: file system index corruption problem
      ... Citrix Presentation Server 4.0 installed. ... In the end I discovered that running chkdsk /f every night would ... I have changed the array controller and one of the ... Temporarily install an 80 GByte IDE disk. ...
      (microsoft.public.win2000.file_system)
    • Re: Moving SCSI RAID array to new server
      ... Install the now blank array into the SBS2003, create the RAID volume, etc... ... I'd also probably lose the shirty SATA drives and eventually swing the whole ... > migrate the settings from the old server I just want to move the old RAID5 ...
      (microsoft.public.windows.server.sbs)