Can create server programmatically, but not with config file....
- From: "CDX" <CDX@xxxxxxxxxxxxxxxx>
- Date: Mon, 19 Jun 2006 23:51:51 +0100
Odd. I'm using VS2005 to build a remoting infrastructure, which is working
absolutely fine. I've been able to encapsulate the client side configuration
into a config file, but not the server side. I've been looking at this for
hours.
==================================
This works
Main
BinaryServerFormatterSinkProvider serverProv = new
BinaryServerFormatterSinkProvider();
serverProv.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
BinaryClientFormatterSinkProvider clientProv = new
BinaryClientFormatterSinkProvider();
IDictionary props = new Hashtable();
props["port"] = 7556;
HttpChannel chnl = new HttpChannel(props, clientProv, serverProv);
ChannelServices.RegisterChannel(chnl, false);
RemotingConfiguration.RegisterWellKnownServiceType
(typeof(ClientObjFactory), "factory.soap", WellKnownObjectMode.Singleton);
==============================
This fails
Main
-----
string configFilePath =
System.IO.Path.Combine(System.Environment.CurrentDirectory,
"server.exe.config");
RemotingConfiguration.Configure(configFilePath, false);
In Config file("server.exe.config")
---------------------------------
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown
mode ="Singleton"
type ="Arrow.ClientObjFactory, ACommon"
objectURI ="factory.soap"/>
</service>
<channels>
<channel ref="http" port="7556" useDefaultCredentials="true">
<serverProviders>
<provider ref="wsdl" />
<formatter ref="soap" typeFilterLevel="Full" />
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>
Error is
"No connection could be made because the target machine actively refused it"
(10061).
I've checked that the config file is indeed where I think it is, and it
is....
Client config file is
------------------
<configuration>
<system.runtime.remoting>
<application>
<client>
<wellknown
type ="Arrow.IClientObjFactory, ACommon"
url ="http://localhost:7556/factory.soap" />
</client>
<channels>
<channel ref="http" port="0">
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>
.
- Prev by Date: Re: Remoting stopped working
- Next by Date: GenuineChannels
- Previous by thread: Cannot create channel sink
- Next by thread: GenuineChannels
- Index(es):
Relevant Pages
|
Loading