Derik Whittaker

Syndication

News


Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Remoting issues w/ auto properties & the ‘remoting proxy has no channel sink’ error

Today I was trying to use our remoting service that we have for our project and out of the blue I received the god awful error:

This remoting proxy has no channel sink which means either the server has no registered server channels that are listening, or this application has no suitable client channel to talk to the server.

Saying that remoting errors are cryptic is an understatement, but HTF am I supposed to determine what caused this error.  In order to try to resolve this I went though my check-list of ‘remoting items’ such as

  • Make sure remoting interfaces are registered on both client and server
  • Make sure remoting contract classes (concrete implementation classes) are marked with MarshelByRefObject
  • Make sure that all objects being passed back and forth were Serializable

After checking all these items I still could not figure out what was wrong.  After staring at the screen for 10+ minutes it finally dawned on me.  The code below is NOT legal

    [Serializable]
public class BatchSendOutputPatientSearchRequest
{
       	private IList _messageTypeFilterParts = new List();
      
	// guts of class here

        public IEnumerable MessageTypeFilterParts { get { return _messageTypeFilterParts; } }
        public DateTimeFilterPart DateTimeFilterPart { get; private set; } }
	public int BusinessUnitId { get; private set; }
}

Can you see the issue?  You cannot have a property that has a public getter and a private setter.  Had i been using a backing field as in the code below, this would not have been an issue.

[Serializable] 
public class BatchSendOutputPatientSearchRequest 
{ 
	private IList _messageTypeFilterParts = new List(); 
	private Int32 _businessUnitID = 0; 
	private DateTimeFilterPart _dateTimeFilterPart = null; 

	// guts of class here 

	public IEnumerable MessageTypeFilterParts { get { return _messageTypeFilterParts; } } 	public DateTimeFilterPart DateTimeFilterPart { get { return _dateTimeFilterPart; } } 
	public int BusinessUnitId { get { return _businessUnitID; } } } 

Don’t get me wrong, I love auto-properties, but sometimes quirks like this piss me off.

Till next time,


Posted 03-24-2009 3:57 PM by Derik Whittaker
Filed under: ,

[Advertisement]

Comments

DotNetKicks.com wrote Remoting issues w/ auto properties
on 03-24-2009 6:41 PM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

DotNetShoutout wrote Remoting issues w/ auto properties & the ‘remoting proxy has no channel sink’ error - Derik Whittaker
on 03-24-2009 10:51 PM

Thank you for submitting this cool story - Trackback from DotNetShoutout

Nik Radford wrote re: Remoting issues w/ auto properties & the ‘remoting proxy has no channel sink’ error
on 03-26-2009 6:10 AM

I assume this is only with remoting. Strange though, since the code compiles down to a backing field.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)