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