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. General Programming
  3. C#
  4. .Net Remoting Issue

.Net Remoting Issue

Scheduled Pinned Locked Moved C#
csharpsysadminhelptutorialquestion
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.
  • J Offline
    J Offline
    jtmtv18
    wrote on last edited by
    #1

    I got everything working fine in my .net remoting proggy. My question is, i want to make a single instance of my obj that my server can put data in and then hand it out to the clients. I dont know how to create a instance of the object from within my server, after it is already registered as a wellknowntype. i tryed using the code from my client to init a instance of the object but it just tells me that "the http something is already in use" i.e this code wont work on the server who registered the object. ChannelServices.RegisterChannel( new HttpChannel() ); IRemoteObj obj = (IRemoteObj) Activator.GetObject( typeof(IRemoteObj), "http://localhost:8085/ObjURI" ); Thanks for your time. Jesse The Code Project Is Your Friend...

    A 1 Reply Last reply
    0
    • J jtmtv18

      I got everything working fine in my .net remoting proggy. My question is, i want to make a single instance of my obj that my server can put data in and then hand it out to the clients. I dont know how to create a instance of the object from within my server, after it is already registered as a wellknowntype. i tryed using the code from my client to init a instance of the object but it just tells me that "the http something is already in use" i.e this code wont work on the server who registered the object. ChannelServices.RegisterChannel( new HttpChannel() ); IRemoteObj obj = (IRemoteObj) Activator.GetObject( typeof(IRemoteObj), "http://localhost:8085/ObjURI" ); Thanks for your time. Jesse The Code Project Is Your Friend...

      A Offline
      A Offline
      Alex Korchemniy
      wrote on last edited by
      #2

      If you want to publish a specific instance of an object you should use RemotingServices.Marshal() instead of RegisterWellKnownServiceType().

      J 1 Reply Last reply
      0
      • A Alex Korchemniy

        If you want to publish a specific instance of an object you should use RemotingServices.Marshal() instead of RegisterWellKnownServiceType().

        J Offline
        J Offline
        jtmtv18
        wrote on last edited by
        #3

        Thanks alot. I figured it out from what you said. Very helpfull thanks. Jesse The Code Project Is Your Friend...

        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