Tuesday, August 15, 2006

RegisterChannel is obsolete, use RegisterChannel instead

me tope con este error:

Warning 6 'System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(System.Runtime.Remoting.Channels.IChannel)' is obsolete: 'Use System.Runtime.Remoting.ChannelServices.RegisterChannel(IChannel chnl, bool ensureSecurity) instead.'

me saco de onda un poco porque System.Runtime.Remoting.ChannelServices.RegisterChannel no existe realmente

El problema es simplemente que les falto .Channels  en la parte del namespace, asi que debio ser:

"use 'System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(IChannel chnl, bool ensureSecurity) instead"

ok, esa fue la primera parte, asi que este overload ahora es obsoleto, pero cual es el equivalente?

RegisterChannel(chnl, true)

o

RegisterChannel(chnl, false)

Reflector al rescate, el equivalente es usar false como el segundo parametro, es justo lo que hace la funcion actual, cuando llamams

RegisterChannel(chnl);

este a su vez llama:

ChannelServices.RegisterChannelInternal(chnl, false);

1 comment:

Luna said...

Hola, saluditos, espero te encuentres bien, te deseo un bonito fin de semana.

:O)