[Mono-bugs] [Bug 76454][Wis] New - Problems with MarshalByRefObject remoting, channels and webservices.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Oct 16 16:28:31 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by carlos at applianz.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76454

--- shadow/76454	2005-10-16 16:28:31.000000000 -0400
+++ shadow/76454.tmp.9107	2005-10-16 16:28:31.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 76454
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: gentoo 64bit
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: carlos at applianz.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Problems with MarshalByRefObject remoting, channels and webservices.
+
+I realize this is probably a bad way of doing remoting and I am in the
+middle of changing that code completely however I figured I should report if 
+something doesn't work the same way as MS.NET works. Also I will try to
+write an example and add to this bug soon.
+
+I have an Application and a WebService that talks to that application. The
+application exposes a MarshalByRefObject instance of an object by using the
+RemotingServices.Marshal method. The webservice requests this object and
+makes some calls to it, those calls almost all work fine, however there is
+one thats a bit more tricky. On the Shared library I have an abstract class
+which extends MarshalByRefObject. On the WebService side I extend that
+class, and then use an instance of it on a call to the Application. It was
+my understanding that in order to make that call the webservice must
+register its own remoting channel, so I did. The first thing I did was
+check if a channel was already registered, if not then register one. On
+Windows with ms.net that worked just fine over thousands of calls however
+on Mono on Linux the call only works once. I followed the behaviour a bit
+and noticed that the first time I check if a channel is registered and
+since the response is false I go ahead and create one and register it, then
+the call works fine, the second call however checks the channel and its
+told that a channel is already registered so it skips that code and makes
+the call, at which point I get the exception below:
+
+Exception: System.Runtime.Remoting.RemotingException
+Message: Cannot create channel sink to connect to URL
+7c14e4f9_6d25_42c1_a93b_69a43fb556ec/-247468681_4.rem. An appropriate
+channel has probably not been registered.
+Source: mscorlib
+in <0x009ad> System.Runtime.Remoting.Proxies.RealProxy:PrivateInvoke
+(System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg,
+System.Exception exc, System.Object[] out_args)
+
+
+I tried registering a channel without checking if one is registered and the
+call just gave me an exception saying a channel was already registered.


More information about the mono-bugs mailing list