Gary A. Bushey [MVP]
9/20/2004 5:34:00 PM
I am using a SharePoint Web Part to call a .Net remote object hosting in a
Windows Service. The first time I call this, everything works fine.
Additional calls result in the dreaded "The channel tcp is already
registered". This occurs if I refresh the page that had the successful call
or if I open another browser window and go to the page that hosts the web
part. Any ideas? My code is below:
TcpChannel chan = new TcpChannel();
ChannelServices.RegisterChannel(chan);
Calculator calc = new Calculator();
if (calc == null)
{
returnRole = "Could not locate server";
}
else
{
returnRole = calc.Add(21,21).ToString();
}
--
Gary A. Bushey
SPS MVP
bushey@mindspring.com