By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,454 Members | 1,413 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,454 IT Pros & Developers. It's quick & easy.

.NET remoting - using code config works / using config does not ( butlistening )

P: n/a

I have a strange problem. Here is some input data before I describe
the problem.
1. RemoteClass (Mathematica) is compiled into dll and put to GAC
2. Server remoting configuration is done by code.
//used in case of code configuration
TcpChannel channel = new TcpChannel(5000);
RemotingConfiguration.RegisterWellKnownServiceType (typeof(RemoteClass.Mathematica),
"Mathematica", WellKnownObjectMode.

// used in case of config file
//RemotingConfiguration.Configure(" nfig",false);
As a result client is able to create objects ( singleton ) when
configured both, by code and configuration file.
The problem arises when I am trying to configure server remoting using
config file. The client is unable to create any objects. Client throws
an exception:

An unhandled exception of type 'System.IO.FileNotFoundException'
occurred in mscorlib.dll Additional information: Could not load file
or assembly 'RemoteClass' or one of its dependencies. The system
cannot find the file specified.

I have managed to observe that when I use config file.
RemotingConfiguration.GetRegisteredWellKnownServic eTypes()
[0].ObjectType is null, while using code configuration this property
contains some usefull information.

What I am doing wrong?

Here is the configuration file of the server:

<?xml version="1.0" encoding="utf-8" ?>
<application name="">
<!--<activated type="RemoteClass.Mathematica, RemoteClass"/>--
<wellknown mode="Singleton" type="RemoteClass.Mathematica,
RemoteClass" objectUri="Mathematica"/>
<channel ref="tcp" port="5000">
<formatter ref="binary" typeFilterLevel="Full"/>
<formatter ref="binary"/>

Kind Regards
Piotr Kolodziej
Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
It seems that the error was caused by NOT specifying assembly version
and token in the server configuration file. But why i do not need to
specify this in case of <activated>?
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.