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

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

P: n/a
Hi

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);
ChannelServices.RegisterChannel(channel);
RemotingConfiguration.RegisterWellKnownServiceType (typeof(RemoteClass.Mathematica),
"Mathematica", WellKnownObjectMode.

// used in case of config file
//RemotingConfiguration.Configure("RemoteHost.exe.co 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" ?>
<configuration>
<system.runtime.remoting>
<application name="">
<service>
<!--<activated type="RemoteClass.Mathematica, RemoteClass"/>--
>
<wellknown mode="Singleton" type="RemoteClass.Mathematica,
RemoteClass" objectUri="Mathematica"/>
</service>
<channels>
<channel ref="tcp" port="5000">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>

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.