Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. remoting connection with http channel with binary formatter

remoting connection with http channel with binary formatter

Scheduled Pinned Locked Moved ASP.NET
helpcomsysadmin
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tripathi Swati
    wrote on last edited by
    #1

    hi my senario is i have one desktop application and one remote service for server now if i want to connect then i m using http channel with binary formatter now my problem is by using my code i can open one instance at a time for other it will give me error saying only port is normally allowed.... i want to run mutliple exe or instance from same machine which will utilize remote services on server please help me ,, below is my code.

    IDictionary props = new Hashtable();
    props["port"] = TechnicalSettings.RemotingServerPort;
    props.Add("typeFilterLevel", TypeFilterLevel.Full);
    //props.Add("timeout", 2000);
    BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
    channel = new HttpChannel(props, clientProvider, null);
    ChannelServices.RegisterChannel(channel, false);

                    //TcpChannel channel = new TcpChannel();
                    //ChannelServices.RegisterChannel(channel, true);
    
                 
    
                    var server = string.Format("http://{0}:{1}/RemoteOperation", TechnicalSettings.RemotingServer,
                                               TechnicalSettings.RemotingServerPort);
    
                    \_remoteOperation = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), server);
                    \_exist = \_remoteOperation.TestRemoting();
    

    Reasons are not Important but Results are Important. http://www.sql4professional.blogspot.com Swati Tripathi

    R 1 Reply Last reply
    0
    • T Tripathi Swati

      hi my senario is i have one desktop application and one remote service for server now if i want to connect then i m using http channel with binary formatter now my problem is by using my code i can open one instance at a time for other it will give me error saying only port is normally allowed.... i want to run mutliple exe or instance from same machine which will utilize remote services on server please help me ,, below is my code.

      IDictionary props = new Hashtable();
      props["port"] = TechnicalSettings.RemotingServerPort;
      props.Add("typeFilterLevel", TypeFilterLevel.Full);
      //props.Add("timeout", 2000);
      BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
      channel = new HttpChannel(props, clientProvider, null);
      ChannelServices.RegisterChannel(channel, false);

                      //TcpChannel channel = new TcpChannel();
                      //ChannelServices.RegisterChannel(channel, true);
      
                   
      
                      var server = string.Format("http://{0}:{1}/RemoteOperation", TechnicalSettings.RemotingServer,
                                                 TechnicalSettings.RemotingServerPort);
      
                      \_remoteOperation = (IRemoteOperation)Activator.GetObject(typeof(IRemoteOperation), server);
                      \_exist = \_remoteOperation.TestRemoting();
      

      Reasons are not Important but Results are Important. http://www.sql4professional.blogspot.com Swati Tripathi

      R Offline
      R Offline
      Ravi Sant
      wrote on last edited by
      #2

      There will be channel setting on remote server as say eg:

      <channels>
      <channel ref="http" port="1234">
      <serverProviders>
      <formatter ref="binary" />
      </serverProviders>
      </channel>
      </channels>

      You can specify multiple channels with different port and create/call different instances of required exposed port.

      // ♫ 99 little bugs in the code, // 99 bugs in the code // We fix a bug, compile it again // 101 little bugs in the code ♫

      T 1 Reply Last reply
      0
      • R Ravi Sant

        There will be channel setting on remote server as say eg:

        <channels>
        <channel ref="http" port="1234">
        <serverProviders>
        <formatter ref="binary" />
        </serverProviders>
        </channel>
        </channels>

        You can specify multiple channels with different port and create/call different instances of required exposed port.

        // ♫ 99 little bugs in the code, // 99 bugs in the code // We fix a bug, compile it again // 101 little bugs in the code ♫

        T Offline
        T Offline
        Tripathi Swati
        wrote on last edited by
        #3

        thanks for your reply. can u pls give me any help link for such senario. because my senario is i have one server i ll install my remote service and window application over der now my client(desktop application) will connect to server using one port i.e. 1069 now i want to give mulitple access (RDP) to say 5-10 users now they all will login and will run the same exe but i think its not possible i m not sure about it wil u pls give ur glance to such senario and let me know wht can be possible in my senario y we want to put remote service and desktop application on same machine and then give to rdp because when users are connect from theri own machine then system is not responding as quick as we have too.

        Reasons are not Important but Results are Important. http://www.sql4professional.blogspot.com Swati Tripathi

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups