all groups > dotnet distributed apps > december 2004 >
You're in the

dotnet distributed apps

group:

.NET Remoting


.NET Remoting kmacintyre
12/22/2004 7:35:10 AM
dotnet distributed apps:
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).
Re: .NET Remoting Sam Santiago
12/23/2004 12:41:32 PM
You should probably use a network packet sniffer to monitor the
communication to see what is happening under the covers. You should
probably also use SOAP formatting vs. binary (if you are using binary) in
order to be able to see the packets in detail. I would recommend the open
source application Ethereal, http://www.ethereal.com.

Thanks,

Sam

--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
[quoted text, click to view]

AddThis Social Bookmark Button