Custom channel sink without using RemotingConfiguration.Configure

  • Thread starter Thread starter Bob Dankert
  • Start date Start date
B

Bob Dankert

Is there any way to implement custom channel sinks while remoting without
using the RemotingConfiguration.Configure() method? I really don't want to
store the data in a .config file as I need to change the configuration
parameters, and do not want to have to write a new file each time. I have
found plenty of examples of using custom channel sinks with the Configure
method, but none that do not use this. Is this possible? If so, can
someone provide an example of how to do this? I am about ready to use
Reflector to see what the .Configure() method does, but I am sure it is
quite in depth and would take significant time to digest.

Thanks,

Bob Dankert
 
Hi,

Currently I am researching the issue and we will reply here with more
information as soon as possible.
If you have any more concerns on it, please feel free to post here.

Thanks for your understanding!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi

You are welcomed!
I will update you ASAP.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Bob,

Bob Dankert said:
Is there any way to implement custom channel sinks while remoting without
using the RemotingConfiguration.Configure() method? I really don't want to
store the data in a .config file as I need to change the configuration
parameters, and do not want to have to write a new file each time. I have
found plenty of examples of using custom channel sinks with the Configure
method, but none that do not use this. Is this possible? If so, can
someone provide an example of how to do this? I am about ready to use
Reflector to see what the .Configure() method does, but I am sure it is
quite in depth and would take significant time to digest.

Thanks,
Bob Dankert

Alternatively, you might want to ask this question on
news://microsoft.public.dotnet.framework.remoting

This newsgroup specifically targets remoting.

Kind regards,
 
Tom,

Microsoft does not have that newgroup as a managed newgroup, which is why I
choose to use this group instead.

Bob Dankert
 
Hi Bob,

Bob Dankert said:
Tom,

Microsoft does not have that newgroup as a managed newgroup, which is why I
choose to use this group instead.

Bob Dankert

I honestly don't know what you mean by "managed" newsgroup, and where you
got this information that it is not "managed". It's a newsgroup that is in
the same family as all public dotnet framework newsgroups.

Check:
http://msdn.microsoft.com/newsgroups/

Select ".NET Development/Framework/dotnet.framework.remoting" on the left
side.

You'll see that dotnet.framework is just one of the newsgroups listed there
(along with any specific newsgroup like dotnet.framework.remoting). I
seriously doubt that what you say is correct. If there would be something
like "managed" vs "non-managed" newsgroups, then surely the remoting
newsgroup is "managed".

Kind regards,
 
Hi again, Bob,

Bob Dankert said:
Tom,

Microsoft does not have that newgroup as a managed newgroup, which is why I
choose to use this group instead.

Bob Dankert

You're right, there are managed vs non-managed groups, I was not aware. And
indeed dotnet.framework.remoting is a non-managed group (/me -> Oops, delete
previous post not an option :D).

Anyway, I still think that you'll be better off with an answer from a group
that specifically targets the Remoting framework. And it doesn't hurt asking
in more than one group (as long as you don't x-post), the chances of getting
an answer are better, and you'll likely get it quicker.

If you post your question over at the remoting newsgroup, you'll get an
answer from people that have experience in using the remoting framework. All
well that Peter Huang is going to try to get more information, the people
there have a better chance of giving you an answer (no offense Peter).

Kind regards,
 
Tom,

I've had really good luck with getting answers from the Microsoft folks in
the past and am not is a big rush to get the information. In my experience,
Microsoft folks (on here, at least) are always willing to go the extra step
to get the answers I need and help with my issues.

If I do not get an answer here, I will try agian in the remoting group.

Thanks for the advise,

Bob Dankert
 
Hi Bob,

Bob Dankert said:
Tom,

I've had really good luck with getting answers from the Microsoft folks in
the past and am not is a big rush to get the information. In my
experience, Microsoft folks (on here, at least) are always willing to go
the extra step to get the answers I need and help with my issues.

If I do not get an answer here, I will try agian in the remoting group.

Of course. My way is usually to ask for a question at the most specific
newsgroup first. For instance, forms questions on
dotnet.framework.windowsforms, remoting questions on
dotnet.framework.remoting etc. They're usually frequented by people that
have experience in that specific matter. If that doesn't give me a good
answer or solution, I ask again on the dotnet.framework group (for a
question related to the framework) or dotnet.general (if it doesn't directly
relate to the framework). It is my experience that I get an answer faster,
and one that is more to the point at the more specific groups. But of course
there is never a guarantee since these are all public forums.
Thanks for the advise,
Bob Dankert

No problem and success,
 
Hi

Sorry for delay reply.
Below is a sample C# code snippet that illustrates how to configure a
custom channel sink programmatically.
IDictionary channelPropsTcp = new Hashtable();
channelPropsTcp["port"] = 25000;
// serverSinkProvider
IDictionary formatterPropsServerTcp = new Hashtable();
formatterPropsServerTcp["typeFilterLevel"] = "Full";
//-- Create provider data
CustomChannelSink formatterProviderServerTcp;
formatterProviderServerTcp = new
CustomChannelSink(formatterPropsServerTcp, null);
//clientSinkProvider
tcpChan = new TcpChannel( channelPropsTcp, null,
formatterProviderServerTcp );
ChannelServices.RegisterChannel(tcpChan);

If you still have any concern, please let me know.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Peter,

Thanks for the help - I will start using this and let you know if I have any
troubles.

Thanks again,

Bob Dankert
 
Back
Top