Re: Cannot Get XML Config file to Work
- From: "GuidoD" <noreply@xxxxxxxx>
- Date: Tue, 3 May 2005 16:21:10 +0200
> To my surprise, when I configure my client
> programmatically, everything works.
> <wellknown type="JobServerLib.IJobServer, JobLib"
> url="http://localhost:4000/JobURI"></wellknown>
Interesting. I wonder how you create an instance of an Interface.
perhaps the config line should be
<wellknown type="JobServerLib.JobServerImplementation, JobLib"
url="http://localhost:4000/JobURI"></wellknown>
Guido
"Ali" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:088c01c54761$c95248e0$a501280a@xxxxxxxxxx
> Hi,
>
> For some reason, I am not able to configure my client's
> configuration using xml. I get the following error:
>
> .Config file ..\..\ConsoleJobClient.exe.config can not be
> read successfully due to exception
> System.Runtime.Remoting.RemotingException: channel
> entries must contain a type attribute of the
> form 'typeName, assemblyName'.
>
> This is the content of my ConsoleJobClient.exe.config
> file:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <system.runtime.remoting>
> <application name="JobClient">
> <client>
> <wellknown
> type="JobServerLib.IJobServer, JobLib"
> url="http://localhost:4000/JobURI"></wellknown>
> </client>
> <channels>
> <channel href="http"
> port="0"></channel>
> </channels>
> </application>
> </system.runtime.remoting>
> </configuration>
>
> To my surprise, when I configure my client
> programmatically, everything works. I even confirmed it
> watching netstat -a -b -n -p TCP.
>
> Here is my programmatic configuration:
>
> HttpChannel clientChannel = new
> HttpChannel(0);
> ChannelServices.RegisterChannel
> (clientChannel);
>
> WellKnownClientTypeEntry
> remoteType = new WellKnownClientTypeEntry(typeof
> (IJobServer), "http://localhost:4000/JobURI");
>
> RemotingConfiguration.RegisterWellKnownClientType
> (remoteType);
>
>
> Please help.
.
- Prev by Date: Re: GUIs and remoting
- Next by Date: Re: custom sink channels and closing connections.
- Previous by thread: Re: Remoted object dies after 5-10 minutes
- Next by thread: Windows service and remoting
- Index(es):
Relevant Pages
|