Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remoting multiple classes w/ config files

Status
Not open for further replies.

KDavie

Programmer
Feb 10, 2004
441
0
0
US
Hello,

I am trying to implement remoting in an Web App that I am working on. The problem is that the business layer has multiple classes and I can't seem to figure out how to make it work.

The remoting portion of my host config file looks like this:

Code:
<system.runtime.remoting>
		<application>
			<service>
				<wellknown mode="Singleton" type="Business.Comments, Business" objuri="Comments" />
			</service>
			<service>
				<wellknown mode="Singleton" type="Business.Correspondences, Business" objuri="Correspondences" />
			</service>
			<service>
				<wellknown mode="Singleton" type="Business.Correspondent, Business" objuri="Correspondent" />
			</service>
		</application>
	</system.runtime.remoting>

The remoting portion of the client config looks like this:

Code:
<system.runtime.remoting>
		<application>
			<client>
				  <wellknown mode="Singleton" type="Business.Comments, Business" url="[URL unfurl="true"]http://localhost/ACTSBusiness"[/URL] /> 
			</client>
			<client>
				<wellknown mode="Singleton" type="Business.Correspondences, Business" url="[URL unfurl="true"]http://localhost/ACTSBusiness"[/URL] /> 
			</client>
			<client>
				<wellknown mode="Singleton" type="Business.Correspondent, Business" url="[URL unfurl="true"]http://localhost/ACTSBusiness"[/URL] /> 
			</client>
		</application>

If I don't place Inherits MarshalByRefObject in the second and third remotable classes then I have no probs the first one works fine and no errors are thrown (even when I leave my config files as I have shown). When I do include Inherits MarshalByRefObject in the 2nd and 3rd remotable classes the app throws an error.

Can anyone tell me where the problem may be. Is it the config files... Is it the classes? I am at a loss, any help would be appreciated.

Thanks,
-Kevin
 
It turns out the I was missing a "shared" constructor in a method in 2 of the classes. It works fine now.

-Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top