[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Another MCSD 70-310 Creating and Consuming .NET Remoting Objects Exam Question

Greg

7/19/2004 12:32:00 AM

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.
4 Answers

Sam Santiago

7/19/2004 1:18:00 AM

0

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.

Greg

7/19/2004 1:27:00 AM

0

Bad Gateway
"Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in message news:O2rP74SbEHA.2816@TK2MSFTNGP11.phx.gbl...
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.

Leo von Wyss

7/19/2004 2:00:00 AM

0

"Greg" <gregjq@msn.com> wrote:

>Bad Gateway
> "Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in message news:O2rP74SbEHA.2816@TK2MSFTNGP11.phx.gbl...
> 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."

Bad Gateway?

You're preparing for the 70-310 and you can't even recognize
a Microsoft Help URN?

I'm surprised you even bother checking the MSDN ...

Maybe somebody else smart enough to use google will benefit
from this in the future.

..NET Framework Class Library
ChannelServices.RegisterChannel Method
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemRuntimeRemotingChannelsChannelServicesClassRegisterChanne...

Greg

7/19/2004 2:26:00 AM

0

Thank you, slave.

"UAError" <null@null.null> wrote in message
news:jaamf0dmo7fop5mkjiiuuqh7vs6to4cv61@4ax.com...
> "Greg" <gregjq@msn.com> wrote:
>
> >Bad Gateway
> > "Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in message
news:O2rP74SbEHA.2816@TK2MSFTNGP11.phx.gbl...
> > 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/frlrfSystemRuntimeRemotingChanne
lsChannelServicesClassRegisterChannelTopic.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."
>
> Bad Gateway?
>
> You're preparing for the 70-310 and you can't even recognize
> a Microsoft Help URN?
>
> I'm surprised you even bother checking the MSDN ...
>
> Maybe somebody else smart enough to use google will benefit
> from this in the future.
>
> .NET Framework Class Library
> ChannelServices.RegisterChannel Method
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemRuntimeRemotingChannelsChannelServicesClassRegisterChan...
sp