Re: Setting exclusiveAddressUse = false

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Barry (Barry_at_discussions.microsoft.com)
Date: 08/27/04

  • Next message: Sam Santiago: "Re: Setting exclusiveAddressUse = false"
    Date: Fri, 27 Aug 2004 12:17:05 -0700
    
    

    We have encapsulated an older STA active x control inside a console
    application so that it can be used by multiple server process at one time:
    each active x process inside a separate STA app domain. These console
    applications start and communicate pack to the client.

    Everything works fine, however the client's initial communication was to a
    server endpoint at port[nnnn]. These individual console applications
    currently allow .NET to chose an open port for returning information to the
    client, the return packes are from port[yyyy]. This is causing concern at
    sites where restrictive firewalls are in place.

    We need these individual app domains to communicate on the same port as the
    primary server application, that is why the reuse.

    As I read the Tcp/Http Channel docs and the Sockets docs it seems that
    setting the channel property["exclusiveAddressUse"] = false should allow this
    to be reused.

    We need the indic=videaul

    "Sam Santiago" wrote:

    > Why do you think you need 2 channels with the same port? I do not think
    > this is possible. This is a socket level restriction. You're probably
    > getting this error:
    >
    > System.Net.Sockets.SocketException: Only one usage of each socket address
    > (protocol/network address/port) is normally permitted
    >
    > Thanks,
    >
    > Sam
    >
    > --
    > _______________________________
    > Sam Santiago
    > ssantiago@n0spam-SoftiTechture.com
    > http://www.SoftiTechture.com
    > _______________________________
    > "Barry" <Barry@discussions.microsoft.com> wrote in message
    > news:43BF1DC3-46BF-4B74-9E70-FCB54F9F0D22@microsoft.com...
    > > Trying to understand why I cannot have two channels registered to the same
    > > port. This is a test case for a business problem I am trying to solve.
    > Any
    > > help appreciated?
    > >
    > > using System;
    > > using System.IO;
    > > using System.Net;
    > > using System.Collections;
    > > using System.Diagnostics;
    > > using System.Reflection;
    > > using System.Runtime.Remoting;
    > > using System.Runtime.Remoting.Channels;
    > > using System.Runtime.Remoting.Channels.Tcp;
    > > using System.Runtime.Remoting.Channels.Http;
    > >
    > > namespace ChannelTest
    > > {
    > > /// <summary>
    > > /// Summary description for Class1.
    > > /// </summary>
    > > class Class1
    > > {
    > > /// <summary>
    > > /// The main entry point for the application.
    > > /// </summary>
    > > [STAThread]
    > > static void Main(string[] args)
    > > {
    > > //
    > > // TODO: Add code to start application here
    > > //
    > > try
    > > {
    > > IChannel channel = MakeChannel(1240);
    > > System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(channel);
    > >
    > > IChannel channel = MakeChannel(1240);
    > > System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(channel);
    > >
    > > }
    > > catch(Exception e)
    > > {
    > > Console.WriteLine(e.Message);
    > > }
    > > Console.ReadLine();
    > > }
    > >
    > > public static TcpChannel MakeChannel(int port)
    > > {
    > > IDictionary props = new Hashtable();
    > > // Specifies the port on which the channel will listen.
    > > // If 0 is specified, then the remoting system will
    > > // locate an open port for you.
    > > props["port"] = port;
    > > // Indicates the name of the channel. If this property is not set,
    > > // the system defaults to the scheme name. If you want to register
    > > // more than one ChannelProvider with the same scheme, each must
    > > // have a unique name. String.Empty will allow any number of
    > > // similar schemas without name collisions.
    > > props["name"] = String.Empty;
    > > props["exclusiveAddressUse"] = false;
    > >
    > > BinaryServerFormatterSinkProvider binaryProvider = new
    > > BinaryServerFormatterSinkProvider();
    > > binaryProvider.TypeFilterLevel =
    > > System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
    > >
    > > return new TcpChannel(props, null, binaryProvider);
    > > }
    > >
    > > }
    > > }
    > >
    > > --
    > > Barry Lattie
    >
    >
    >


  • Next message: Sam Santiago: "Re: Setting exclusiveAddressUse = false"

    Relevant Pages

    • Re: Question regarding SSH via Lantronix SCS100
      ... external secure console server that handles SSH authentication. ... configure the console port to accept this connection, ...
      (comp.dcom.sys.cisco)
    • Re: Help! Console changes baud rate after login
      ... The cyclades port is set to 9600 baud, and it connects to the system ... If I jump to the console port, ... characters and the server hangs. ...
      (comp.unix.solaris)
    • SUMMARY: Cannot solicit prompt when connecting to COM1
      ... This enabled our DS10 to use the COM port. ... I must save face by saying this server ... > and before bringing down to SRM I wanted to check connectivity over this ... Set the console variable to serial, init the console and you should be ...
      (Tru64-UNIX-Managers)
    • Re: Solaris 8 /dev/console problem
      ... >> console server. ... >> forever and there's no console login prompt. ... the port stalls on trying to send the data. ... > If the line isn't hooked up, then it'll always transmit. ...
      (comp.unix.solaris)
    • Re: Console question
      ... There is no keyboard neither internal console on the server. ... to send" on its console port, and serial I/O to that port hangs. ... Or you could wire DTR to CD & DSR, and then wire RTS ...
      (comp.unix.bsd.freebsd.misc)