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. .NET (Core and Framework)
  4. Remoting config file

Remoting config file

Scheduled Pinned Locked Moved .NET (Core and Framework)
sysadminsecurityxmljsonhelp
2 Posts 1 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.
  • B Offline
    B Offline
    bwilhite
    wrote on last edited by
    #1

    I'm trying to move from programmatic configuration of remoting to using a config file, but I can't seem to get the config file to work. Here's the relevant programmatic code (server side)... BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider(); serverProv.TypeFilterLevel =System.Runtime.Serialization.Formatters.TypeFilterLevel.Full; BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider(); IDictionary props = new Hashtable(); props["port"] = 8000; // Create and register an TCP channel TcpChannel serviceChannel = new TcpChannel(props, clientProv, serverProv); ChannelServices.RegisterChannel(serviceChannel, true); // Expose an object AccountConnectionService service = new AccountConnectionService(); RemotingServices.Marshal(service, "myService", typeof(IAccountConnectionService)); This works just fine. Here's my .config file... configuration system.runtime.remoting application service wellknown type="Common.AccountConnectionService,Common" mode="Singleton" objectUri="myService" wellknown service channels channel ref="tcp" port="8000" channels serverproviders formatter ref="binary" typefilterlevel="Full" serverproviders clientprovider formatter ref="binary" typefilterlevel="Full" clientprovider application system.runtime.remoting configuration This doesn't work. It throws an "Authentication Exception" because the transport connection was closed. I'm not sure what the difference is or what I'm missing. I checked out the MSDN documentation, but tbh I couldn't make heads or tails of it. (I've cobbled this config together from various tutorials.) I don't think this should matter, but I'm still using programmatic configuration on the client side, I can post that code also if it helps. Any help is much appreciated. BW p.s. I apologize for the config looking ugly. The xml was getting messed up in the post, and I couldn't figure out how to make it look right.

    B 1 Reply Last reply
    0
    • B bwilhite

      I'm trying to move from programmatic configuration of remoting to using a config file, but I can't seem to get the config file to work. Here's the relevant programmatic code (server side)... BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider(); serverProv.TypeFilterLevel =System.Runtime.Serialization.Formatters.TypeFilterLevel.Full; BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider(); IDictionary props = new Hashtable(); props["port"] = 8000; // Create and register an TCP channel TcpChannel serviceChannel = new TcpChannel(props, clientProv, serverProv); ChannelServices.RegisterChannel(serviceChannel, true); // Expose an object AccountConnectionService service = new AccountConnectionService(); RemotingServices.Marshal(service, "myService", typeof(IAccountConnectionService)); This works just fine. Here's my .config file... configuration system.runtime.remoting application service wellknown type="Common.AccountConnectionService,Common" mode="Singleton" objectUri="myService" wellknown service channels channel ref="tcp" port="8000" channels serverproviders formatter ref="binary" typefilterlevel="Full" serverproviders clientprovider formatter ref="binary" typefilterlevel="Full" clientprovider application system.runtime.remoting configuration This doesn't work. It throws an "Authentication Exception" because the transport connection was closed. I'm not sure what the difference is or what I'm missing. I checked out the MSDN documentation, but tbh I couldn't make heads or tails of it. (I've cobbled this config together from various tutorials.) I don't think this should matter, but I'm still using programmatic configuration on the client side, I can post that code also if it helps. Any help is much appreciated. BW p.s. I apologize for the config looking ugly. The xml was getting messed up in the post, and I couldn't figure out how to make it look right.

      B Offline
      B Offline
      bwilhite
      wrote on last edited by
      #2

      Well, no replies so far...maybe a different question... Does anyone know where to find a *thorough* tutorial/article on using a .config file for remoting? And please don't say "just do a search, there are plenty out there," because every one I've seen so far is most certainly NOT thorough. Even the articles I've found on MSDN generally only touch on a few of the possible configuration features. The doc on the schema of configuring for remoting is also noticeably out of date. If someone could point me to one they already know of, though, that would be very much appreciated. That said, if I don't get an answer here or elsewhere...I've got Rammer's book on the way, so hopefully I'll find what I need in there (but an earlier answer would be nice :) ). Thanks for any help. BW

      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