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 migration: client hangs [modified]

.Net migration: client hangs [modified]

Scheduled Pinned Locked Moved C#
csharpsysadminquestionworkspace
4 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.
  • H Offline
    H Offline
    Helfdane
    wrote on last edited by
    #1

    Hi, I've been googling a long time about this, so I thought you peeps might have an answer for me. I have a application which has been written in .net1.1 a long time ago. I ported that application to .net2.0 (one step at a time ;)) and left the code the same as much as I could. Everything works, except one thing which I cannot figure out why not. I have this service, which is listening on a port on the same server as the client runs on. My client in this case is a configuration editor with some basic functionality like getting the time the last synchronisation ran etc. The service is called the StatusPublisher. I initialize the the publisher object for use with this call:

    *****.IStatusPublisher publisher =
    (*****.IStatusPublisher)Activator.GetObject(typeof(*****.IStatusPublisher),
    string.Format("tcp://localhost:{0}/StatusPublisher", servicePort));

    This is the call which works in .net1.1 but fails in .net2.0:

    string returnValue = publisher.NextRun (serviceId);

    This call locks up the complete config-tool, kinda forever (killed it after 50 minutes). I had a logging step between every code block, but the logger before the publisher.NextRun() logged fine, everything after was a complete lock up. Any idea why I can instantiate the publisher object but cannot call a method from it?

    The consumer isn't a moron; she is your wife.

    modified on Monday, November 16, 2009 7:41 AM

    S 1 Reply Last reply
    0
    • H Helfdane

      Hi, I've been googling a long time about this, so I thought you peeps might have an answer for me. I have a application which has been written in .net1.1 a long time ago. I ported that application to .net2.0 (one step at a time ;)) and left the code the same as much as I could. Everything works, except one thing which I cannot figure out why not. I have this service, which is listening on a port on the same server as the client runs on. My client in this case is a configuration editor with some basic functionality like getting the time the last synchronisation ran etc. The service is called the StatusPublisher. I initialize the the publisher object for use with this call:

      *****.IStatusPublisher publisher =
      (*****.IStatusPublisher)Activator.GetObject(typeof(*****.IStatusPublisher),
      string.Format("tcp://localhost:{0}/StatusPublisher", servicePort));

      This is the call which works in .net1.1 but fails in .net2.0:

      string returnValue = publisher.NextRun (serviceId);

      This call locks up the complete config-tool, kinda forever (killed it after 50 minutes). I had a logging step between every code block, but the logger before the publisher.NextRun() logged fine, everything after was a complete lock up. Any idea why I can instantiate the publisher object but cannot call a method from it?

      The consumer isn't a moron; she is your wife.

      modified on Monday, November 16, 2009 7:41 AM

      S Offline
      S Offline
      Saksida Bojan
      wrote on last edited by
      #2

      I can't help you there. I Have search on MSDN and can't find any info on IStatusPublisher. I only can presume that it is not shipped with .Net Framework. If you or your own company is author, then investigate, or contact a technical support on official forum or to author/company

      H 1 Reply Last reply
      0
      • S Saksida Bojan

        I can't help you there. I Have search on MSDN and can't find any info on IStatusPublisher. I only can presume that it is not shipped with .Net Framework. If you or your own company is author, then investigate, or contact a technical support on official forum or to author/company

        H Offline
        H Offline
        Helfdane
        wrote on last edited by
        #3

        It's one of our own clases which is an class implementing MarshalByRefObject. It's actually quite the same as MarshalByRefObject only adding some methods.

        internal class StatusPublisher : MarshalByRefObject, *****.IStatusPublisher
        {
        public string NextRun(string serviceId)
        {
        //code block for execution
        }
        }

        Thing is, I can load this class, but I cannot call the methods on it. So it must go wrong higher up the chain, which is .Net code I think.

        The consumer isn't a moron; she is your wife.

        S 1 Reply Last reply
        0
        • H Helfdane

          It's one of our own clases which is an class implementing MarshalByRefObject. It's actually quite the same as MarshalByRefObject only adding some methods.

          internal class StatusPublisher : MarshalByRefObject, *****.IStatusPublisher
          {
          public string NextRun(string serviceId)
          {
          //code block for execution
          }
          }

          Thing is, I can load this class, but I cannot call the methods on it. So it must go wrong higher up the chain, which is .Net code I think.

          The consumer isn't a moron; she is your wife.

          S Offline
          S Offline
          Saksida Bojan
          wrote on last edited by
          #4

          have you tried removing Internal keyword? Or tried add public in front of class? Is this class a DLL?

          Helfdane wrote:

          Thing is, I can load this class, but I cannot call the methods on it

          When you set your debugger, in Quick watch can you use method or what kind of error will throw?

          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