Sam Santiago
7/19/2004 1:18:00 AM
I would say the answer is B. In the example given an HTTP channel is being created with no name specified, so the default name is "http". If another HTTP channel had been created first without specifying a name then you would already have a channel named "http" in the AppDomain.
Check out this entry from the .NET 1.1 SDK documentation:
ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemRuntimeRemotingChannelsChannelServicesClassRegisterChannelTopic.htm
"You cannot register two channels with the same name in an AppDomain. By default, the name of an HttpChannel is "http", and the name of a TcpChannel is "tcp". Therefore, if you want to register two channels of the same type, you must specify a different name for one of them through configuration properties."
--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
"Greg" <gregjq@msn.com> wrote in message news:OQq%23TfSbEHA.3728@TK2MSFTNGP10.phx.gbl...
Now here is another question...
You are creating a .NET Remoting application. You use the following code to create and register an HttpServerChannel object to listen at port 8080.
Dim channel as New HttpServerChannel(8080)
ChannelServices.RegisterChannel(SrvrChannel)
However, when you run the application, an exception is thrown. Which of the following reasons explains the exception? (Choose the one correct option.)
A. No ports are available for registering a channel.
B. Another channel with the same name exists in the application domain.
C. You have another HttpServerChannel in the application domain.
D. You have specified a valid name for the HttpServerChannel.
It said that D was wrong, but I couldn't find any information in MSDN on what could be the correct answer.
> Greg s
Make it idiot proof and someone will make a better idiot.